XML technologies / CSS / Advanced websites with CSS / Using fonts with CSS / The font-size property

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

Specifying font sizes is one of the most troublesome aspects of web design because browsers differ greatly in how they interpret and display them. Before exploring this problem, let us examine the official definitions for specifying font sizes on web pages.

CSS provides seven constants for defining the property font-size:

These values claim to describe absolute font sizes, but in practice the browser ultimately determines their numeric values. Truly absolute font sizes can be specified using the familiar method of height values in pixels or points.

The property font-size can also use relative font sizes. Available values are larger and smaller as well as percentages and em height.

  

  

 

 

 

back to top