8.2. The font-family Property

The issue of font families gets tangled up with questions of standard versus nonstandard, and supported versus unsupported fonts, which are deserving of an entire section of this chapter. Here, I'll cover them briefly, but later in this chapter I'll cover the subject in much greater detail.

You can use the font-family property to assign a specific family, a list of specific families, and/or a generic family to any HTML block or element.

Most of the time, to achieve the result you want in the way the page looks, you'll supply a list of specific fonts, separated from one another by commas, and end the list with the generic font that is to be used if none of your specified fonts is available. Here's how that looks: ...

Get HTML Utopia: Designing Without Tables Using CSS 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.