CSS font-family property
CSS font-family property defines the types of font faces that vary in size and shapes.
There are only five generic families such as serif, sans-serif, cursive, fantasy, and monospace. But each generic family has many other families (family-name).
font-family : list of family-names, generic-family
The fonts that proportionaly-spaced and have thick or thin strokes than fonts.
sans-serif means without sharp strokes. The fonts that have plain stroke endings i.e. there are sharp or cross strokes.
They are not formal type fonts. They look as if they have been written by a brush or hand.
fantasy fonts are more decorative and contain expressive representation of characters.
It looks like computer code. It represents text as if typed by a keyboard.
list of families
We may use comma separated list of family names. This list should end up with a generic-family.
And if one family is not rendered by the browser, the next one will be used. If all the families are not rendered by browser, the generic-family must be used.
font-family: courier, monospace;
It applies to all elements
Was this article helpful?