property

CSS font-family

Lists font families in preference order. Selection can depend on available fonts and glyph coverage. Quote ambiguous family names, leave generic keywords unquoted, and provide a suitable fallback for the content’s script.

Formal Syntax & Structure

css syntaxcss
font-family = [ <font-family-name> | <generic-font-family> ]#

Parameters & Attributes

NameTypeDescription
family listcomma-separated family namesOrdered named or generic font families.

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>CSS reference demo</title><style>#sample { font-family: "Example Missing Font", sans-serif; }</style></head><body><p id="sample">A field note from the coast.</p></body></html>
CSS Reference