8.1. How CSS Deals With Fonts

With the emergence of CSS, the HTML <font> tag is deprecated in favor of using styles to achieve the same or better results.

Using CSS gives you great flexibility in working with fonts. While HTML limits you to working with only seven standard font sizes, CSS allows you to specify font sizes in a number of different ways, providing a nearly unlimited range of sizes. In addition, CSS formalizes the ability to define a fallback, or default, font to be used in case none of the fonts you specify in a style rule is available on the user's machine when your page is rendered. This capability existed with the deprecated <font> tag in HTML, but the list of defaults was never officially standardized.

With CSS, you also get ...

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.