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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access