Specifying consistent and user friendly font sizes


Pixels

Percentages

EM

Keywords

Specify font sizes that will produce consistent results in most browsers

  1. Choose a keyword, medium, and set it as the font size in the body rule.
  2. This sets default font size for the page
  3. Set font sizes of other elements relative to the body font size using em or percentages.
  4. Both do the same thing

Specifying fonts relatively allows easy change of font size in the whole page/site by simply changing the body font size.