The font-family property sets a prioritized list of typefaces for text. The browser tries each name in order and uses the first font that is available (installed or loaded via @font-face).
Always end the list with a generic family such as sans-serif or serif. The property is inherited. Pair it with font-size, font-weight, and the font shorthand when you need more than a typeface.
Standard-track.
Not deprecated. Core families are Baseline widely available. Newer generics such as math and ui-* have uneven support — keep a classic fallback in the stack.
Bottom line: Safe for production. Keep classic generics in every stack so newer keywords like math or ui-* are optional enhancements.
Remember
Key Takeaways
Role: choose typefaces in priority order.
Stack: named fonts first, generic last.
Quotes: use for spaced names; never for generics.
Inherited: set on a parent to style whole sections.
One line:font-family is a prioritized font list that should end with a generic fallback.
Frequently Asked Questions
It sets a prioritized list of typefaces. The browser uses the first installed (or downloadable) font that can draw each character.
Named fonts may be missing. A generic like sans-serif or serif guarantees a similar style of fallback.
Quote names with spaces, digits, or punctuation other than hyphens — for example "Times New Roman". Generics must never be quoted.
A comma-separated list from preferred to fallback fonts, usually ending with a generic family.
font-family only chooses the typeface. The font shorthand can also set size, weight, style, and line-height together.
It is Baseline widely available: Chrome 1+, Firefox 1+, Safari 1+, Edge 12+, Opera 3.5+, Internet Explorer 3+. It is a browser style property, not a Node.js feature.