8.3. The font-size Property

Font size is one of the most troublesome aspects of Web design. This is because browsers vary widely in the ways they understand and apply some of the key concepts that determine how fonts will be sized for display. Before we explore this any further, let's take a look at the official definition of the ways in which you can define the size of a font on a Web page. You can specify the font size you wish to use by selecting from a collection of seven constants:

  • xx-small

  • x-small

  • small

  • medium

  • large

  • x-large

  • xx-large

These define what are referred to as absolute sizes, but as we'll see, in reality, there's nothing terribly absolute about them in the usual sense of that word. You can also define absolute font sizes by specifying ...

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.