On this page
font-family
Prev: typography | Up: typography | Next: `font-size`
Rel: typography, Typography & Color Guide
Ref: MDN Web Docs — font-family
Tags: #public #web #css #properties #typography #tier/core
Syntax & Overview
font-family: system-ui, -apple-system, sans-serif;
Ordered fallback list of font families.
- Initial:
UA-dependent| Inherited: Yes | Animatable: Discrete
Notes & Best Practices
- Always end with a generic fallback (
sans-serif,serif,monospace) and quote multi-word font names ("JetBrains Mono").
Example
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
Linked from
Related notes
- tuts/css/properties/typography/font-size Linked here; links to this page; shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography Linked here; links to this page; shared tags: #css, #properties, #typography, #web
- tuts/css/properties/typography_and_color Linked here; shared tags: #css, #properties, #typography, #web
- tuts/html/elements/text/font links to this page; shared tags: #tier, #web
- tuts/html/elements/text links to this page; shared tags: #web
- tuts/css/properties/typography/accent-color shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/color shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/color-scheme shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/line-height shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/text-wrap shared tags: #css, #properties, #tier, #typography, #web