html how to insert google font code example
Example 1: font for css code google link
@import url(https://fonts.googleapis.com/css?family=Open+Sans);
body{
font-family: 'Open Sans',serif;
}
Example 2: google font import
<!-- To import google font add this to the head of your HTML then you can use use the imported font family in your CSS file -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">