A generic font is a CSS font-family category representing a broad typeface class. It gives the browser a dependable fallback when a specific font is unavailable. section 4.2
CSS provides five generic font families:
- serif — traditional letterforms with small finishing strokes section 4.1
- sans-serif — clean letterforms without finishing strokes section 4.1
- monospace — gives every character the same amount of space section 4.1
- cursive — resembles handwritten pen or brush writing section 4.1
- fantasy — uses fanciful designs for special effects section 4.2 section 4.1
A simple fallback
Apply a generic family directly with the font-family property: h3 { font-family: sans-serif; } p { font-family: serif; } The browser then renders headings and paragraphs using those broad categories. section 4.2
h3 { #1
font-family: sans-serif; #1
} #1
p { #2
font-family: serif; #2
} #2
Inspect the small CSS example applying sans-serif to an h3 and serif to paragraphs. section 4.2

