CSS Property: font-family
Font name. This can be a single font or a comma-separated list, of which a browser will apply the first font it can use (such as one installed on a user’s computer).
Possible Values
Value | Description | Example |
---|---|---|
[Font family] | Font name. Fonts are not CSS-specific and need to be either installed on a user’s computer or downloaded for CSS to grab hold of them and apply them. | Helvetica |
serif | Generic font family. Serif font, like Times or Times New Roman. | |
sans-serif | Generic font family. Sans-serif font, like Arial or Helvetica. | |
monospace | Generic font family. Fixed-width font, like Courier. | |
cursive | Generic font family. Flowing font, like Zapf Chancery. | |
fantasy | Generic font family. Daft font, like Papyrus. | |
[Multiple font families] | A comma-separated list of font family names. A browser will apply the first font in that list that is is capable of applying. | Helvetica, Arial, sans-serif |
inherit | ||
initial | ||
unset |
Example
body { font-family: Helvetica, Arial, sans-serif; }
blockquote { font-family: Times, "Times New Roman", serif; }