New! My 44-page ebook "CSS in 44 minutes" is out! 😃
#font-family
font-family: "Source Sans Pro", "Arial", sans-serif;
When using multiple values, the font-family
list of font families defines the priority in which the browser should choose the font family.
The browser will look for each family on the user's computer and in any @font-face resource.
The list is prioritized from left to right: it will use the first value if it's available, or go to the next one, until the end of the list is reached. The default font family is defined by the browser preferences.
In this example, the browser will try to use Source Sans Pro
if it's available. If it can't find it, it will try to use Arial
. If it's not available either, it will use the browser's sans-serif
font.
font-family: serif;
The browser will use a serif font family: all characters have stroke endings.
font-family: sans-serif;
The browser will use a sans-serif font family: no character has stroke endings.
font-family: monospace;
The browser will use a monospace font family: all characters have the same width.
font-family: cursive;
The browser will use a cursive font family.
font-family: fantasy;
The browser will use a fantasy font family.