O'Reilly logo

Cascading Style Sheets (CSS) by Example by Steve Callihan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required