Name

font-family

Synopsis

Specifies any font (or list of fonts, separated by commas) for a text element. Bear in mind, however, that the font needs to be present on the user’s machine to display.

Values:

[[<family-name> | <generic-family> ] [,<family-name> |
<generic-family> ]*] | inherit

Initial value:

Depends on user agent (the default font in the browsing device).

Applies to:

All elements.

Inherited:

Yes.

Computed value:

As specified.

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.