Warning Unquoted multi-word font-family name
Why a font name containing a space, like Open Sans, needs to be quoted in a font-family declaration.
The validator flags a font-family value listing a multi-word font name with no surrounding quotes (excluding generic family keywords like sans-serif or monospace, which are never quoted).
Example
/* Wrong: two words parsed as two separate identifiers */
.body { font-family: Open Sans, sans-serif; }
/* Right */
.body { font-family: "Open Sans", sans-serif; }Why it matters
CSS's font-family value is a comma-separated list where each entry is either a quoted string or an unquoted CSS identifier. An identifier can technically contain spaces if every word is a valid identifier token, which "Open" and "Sans" individually are — so font-family: Open Sans often does work in practice, which is exactly what makes it a fragile habit rather than a reliably safe one. Font names that start with a number, contain punctuation other than a hyphen, or coincide with a CSS-reserved keyword can fail to parse as an unquoted identifier at all. Quoting removes the ambiguity entirely and matches how a font name is written literally everywhere else (the OS font list, an @font-face declaration's font-family descriptor, and so on).
Frequently asked questions
Do single-word font names need quotes?
No — a single-word name like Arial or Verdana is a valid identifier with no ambiguity, so quoting is optional there. This check only flags names that contain a space.
Why doesn't this flag generic keywords like sans-serif?
Generic family keywords (serif, sans-serif, monospace, cursive, fantasy, system-ui, and a few others) are reserved CSS keywords, not font names — they're never quoted, and the validator's font-family check excludes them for exactly that reason.