fonts css code example
Example 1: font-style css
#example {
font-style: normal; /* no specification, default */
font-style: italic; /* font is italic */
font-style: oblique; /* font is italic, even if italic letters are not specified for font family */
font-style: inherit; /* inherit property from parent */
font-style: initial; /* default value */
}
Example 2: font family css
font-family: "Comic Sans MS", cursive, sans-serif;
Add More Fonts Here : - https://fonts.google.com/
Example 3: css font
@font-face {
font-family: "Name of the font"; /*eg Ubuntu*/
src: url("your/path/to/the.font");
}
p{
font-family: "Ubuntu";
}
Example 4: css font family
p{
font-family:garamond,serif;
}
Example 5: css font
p {
font: italic small-caps bold 12px/30px Georgia, serif;
}
/*
The font property is a shorthand property for:
font-style
font-variant
font-weight
font-size/line-height
font-family
*/
Example 6: font-family css
font-family: "Times New Roman", Georgia, serif;
/* If the browser does not support the first font (ie: Times New Roman),
it will then try the next font (ie: Georgia). The last font should always
be a "generic-family" font (ie: serif, sans-serif, etc..).
/* If font is more then one word, it must be put into quotes. */