Font-family property
The CSS font-family property specifies a preferred typeface or ordered sequence of fallback typefaces for rendering text.
Web Design Playground
A CSS property that specifies the preferred font family or ordered list of font families for text rendering.
- How it is used
- Assigns a preferred typeface or ordered fallback families to an element’s text.
- How deep it goes
- Works from generic families through system-font stacks to applying hosted and self-hosted web fonts.
- Examples
- Uses serif and sans-serif element rules, ordered system-font stacks, a Google Fonts rule, and an @font-face listing.
- What you can do after
- Operates and configures CSS font stacks to style elements with preferred families and generic fallbacks.
Read how Web Design Playground explains font-family property →
Tiny CSS Projects
The CSS font-family property specifies the typeface or ordered list of typefaces used for text.
- How it is used
- Sets typefaces for page themes and individual headings, cards, and form fields.
- How deep it goes
- Explains imported families, generic fallbacks, inheritance, and shorthand through CSS examples; does not examine font-rendering internals.
- Examples
- Uses a newspaper theme, hotel cards, a checkout cart, and text and email inputs.
- What you can do after
- Apply it via Google Fonts and CSS to choose families, supply fallbacks, and match form controls to page typography.
Web Design Playground, Second Edition
The CSS font-family property specifies the typeface or sequence of fallback typefaces used to render an element.
- How it is used
- Assigns typefaces to page elements, from individual headings and paragraphs to all page text.
- How deep it goes
- Works through generic families, system-font naming and ordered fallbacks, then shows how to use a hosted family.
- Examples
- Shows sans-serif headings, serif paragraphs, a landing-page font stack, and paragraphs styled with Google Fonts’ Lato.
- What you can do after
- Operate/configure it to choose an element’s typeface and provide alternatives when a preferred font is unavailable.
Read how Web Design Playground, Second Edition explains font-family property →
Also covered in
What to know first
- sans serif typefaceA sans-serif typeface is a typeface whose letterforms lack projecting finishing strokes called serifs.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- Document Object ModelThe Document Object Model is a platform-independent programming interface that represents a document as a structured tree of nodes and provides ways to access and modify its content and structure.
Related concepts
- generic fontuses · A generic font family is a CSS keyword representing a broad category of typefaces that browsers can select as a fallback.
- style propertykind of · A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.
- font familyconfigures · A font family is a named collection of related fonts or typefaces sharing a visual design while differing in styles, weights, or other attributes.
- font stackconfigures · A font stack is an ordered list of typefaces that specifies fallback choices when earlier fonts are unavailable.
- h3 elementconfigures · An h3 element is an HTML heading element representing the third hierarchical level in a document or section.
Questions about font-family property
What is font-family property?
The CSS font-family property specifies a preferred typeface or ordered sequence of fallback typefaces for rendering text.
Which Manning books explain font-family property?
Web Design Playground, Tiny CSS Projects and Web Design Playground, Second Edition.
What should I know before learning font-family property?
Manning books that teach font-family property usually introduce sans serif typeface, bold, CSS and Document Object Model first.
What is font-family property a kind of?
Font-family property is a kind of style property. A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


