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

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

Font sizes could be specified for web pages even before CSS. HTML provides the size attribute in the <font> tag, with an absolute scale from 1 to 7 and relative values such as +1 or -1 relative to the browser’s preset default value.

The fact that HTML has seven values and CSS offers seven absolute constants has led some people to assume incorrectly that there must be a one-to-one correspondence. There is no such correspondence. Defining <font size="7"> in HTML does not necessarily produce the same result as font-size: xx-large in a CSS rule.

  

 

 

 

back to top