how to add font family in css code example
Example 1: import font css
@font-face {
font-family: "Open Sans";
src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
}
Example 2: css font face
@font-face {
font-family: thisSpecialFont;
src: url(linkToFontFile.woff);
}
body {
font-family: thisSpecialFont;
}
Example 3: font face
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
Example 4: css font family
p{
font-family:garamond,serif;
}
Example 5: css font family
.serif_font {
font-family:"Times New Roman", serif;
}
.sans_serif_font {
font-family:"Open Sans", sans;
}
Example 6: css font family
Pittsburgh, PA