CHAPTER 13

image

Font

The font properties can be used to change aspects of the font and to load custom fonts. They can be applied to any element and they all inherit.

font-family

font-family sets the face of the font. Its value can be a specific font name such as times or verdana; or a generic family name such as sans-serif, serif, or monospace.

font-family : inherit | <family-names> | <generic-families>

The value for this property is a prioritized list of one or more font names. If a browser does not have access to the first font, it uses the next font and so on.

font-family: "Times New Roman", times, serif;

It is recommended to end the list with a ...

Get CSS Quick Syntax Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.