font-size

Set the size of your font in a variety of ways. We recommend that you use percentages for general content and reserve static values for special cases.

Value Description
percentage The width of this element will be a percentage of the element it is inside of.
size px - size in terms of pixels
em - size in terms of the current font size
in - size in terms of inches
cm - size in terms of centimeters
fsize-key-term Use key terms to define the size of the font. Available terms: xx-large, x-large, large, medium, small, x-small, and xx-small.

Code:

p { font-size: 120%; }
ol{ font-size: 10px; }
ul{ font-size: x-large; }

Display:

This is a font size of 120%

  1. This is a font size of 10px
  • This is a font size of "x-large"

Compatibility Issues:

IE 5.0 - xx- and x- prefixes are buggy.
IE 5.5 - xx- and x- prefixes are buggy.