The font-family
property designates the font for an element.
The font-family
property can use several font names as fallbacks in which the browser tries the comma-separated list in order until it finds the first font it can support. Start with the name of the font desired first in the list, and always end with a generic family (sans-serif
, serif
, cursive
, etc.) Font names with white-space must be enclosed in quotes.
p.one {
font-family: Arial, "Helvetica Neue", sans-serif;
}
family-name / generic-family
Prioritized, comma-separated list of font family names or generic names.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of font-family
? Submit a codepen.io demo and we'll showcase it here ↴