Setting Font Families

In CSS, the term font family refers to either a specific font family—such as Times New Roman, Verdana, or Helvetica, for instance—or to a generic font family, such as serif, sans-serif, or monospace.

Font Realities

When specifying font families for display on your Web page, you need to realize that a font cannot be displayed if it is not installed on the user's system. You can't assume, in other words, that any one font is present and available. If the font you specify is not available and you've specified no additional alternative fonts, the default text font is displayed. If you specify additional alternative fonts, your first alternative font is displayed if it is available; if not, then your second alternative font is ...

Get Cascading Style Sheets (CSS) by Example 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.