Tuesday, September 30, 2008

Font Size - Absolute Size Keywords

The font-size absolute size keywords are a set of keywords that specify certain font sizes regardless of the inherited font size.
These are the font-size absolute size keywords with their resulting font size in pixels:
xx-small
9px
x-small
10px
small
13px
medium
16px
large
18px
x-large
24px
xx-large
32px

Example: <p style="font-size: large">
Note that the ratio of the font size between two consecutive keywords is not fixed: the ratio of one keyword and the next larger one varies between 1.11 to 1.33 .
The font sizes that the keywords map to are consistent across browsers. Also, text that is sized with absolute size keywords can be resized by using the browser's Zoom or Text Size feature. Therefore, absolute keywords are recommended for text sizing provided that one can accept the specific sizes that the keywords map to.
Note: Some sources erroneously state that each absolute size keyword's corresponding font size is 1.5 or 1.2 times the previous keyword's font size.

No comments: