HTML and CSS Standards

My Preferred Sizing Method

This page is premised on setting the base size to 10 pixels instead of 16 pixels. This is effected by saying
body { font-size: 62.5%; }
resetting the value of an em. Now you can precisely set sizes to known pixels by single-decimal em values while maintaining scalability.

The down side of this method is that you will have to make adjustments to account for browser heading differences. MSIE and Gecko/Opera heading sizes will be different unless you define them yourself—MSIE larger, using the regular size, where Gecko and Opera use the new em as the basis for sizing headings (see table at bottom).

However, this does not show the quirky behaviour in Opera as the other scalable method except that xx-small and x-small are still the same size, em resizing not having any effect on named sizing, nor is there a difference in how Gecko squeezes points between pixels under OS X. Why does it not surprize me that MSIE under OS X defeats this method by making most sizes one pixel smaller than advertised here.

The one problem I've found with this method is curtesy of my computer science PhD nephew—he sets a minimum font-size of 13px. That means that he rewrites the 62.5% to 13px and since I commonly use 1.3em (13px) as my regular type size, he sees it as 17px (1.3em x 13px = 16.9px ⇒ 17px), much larger than needed.

—————| 7 pixel

—————| 8 pixel

—————| 6 point

—————| xx-small

—————| 0.9 em

—————| 9 px

—————| 7 point

—————| default

—————| x-small

—————| 1.0 em

—————| 10 px

—————| 1.1 em

—————| 11 px

—————| 8 point

—————| 1.2 em

—————| 12 px

—————| small

—————| 1.3 em

—————| 13 px

—————| 10 point

—————| 1.4 em

—————| 14 px

—————| 1.5 em

—————| 15 px

—————| 11 point

—————| medium

—————| 1.6 em

—————| 16 px

—————| 12 point

—————| large

—————| 1.8 em

—————| 18 px

—————| 19 px

—————| 14 point

—————| x-large

—————| 2.4 em

—————| 24 px

—————| 18 point

—————| xx-large

—————| 3.2 em

—————| 32 px

—————| 24 point

etc.

Headings

Here h1-6 have been redefined to be the indicated sizes that correspond to the “standard” sizes (sorry Gecko), based on matching font size 6 ⇒ heading 1 etc. Naturally, you may set the size as desired, as has been done on these pages, where the h1 (“HTML and CSS Standards”) is smaller than the h2 used as a page title.

Heading size vs. "font-size" CSS specification.

Heading 1

3.2 em

Heading 2

2.4 em

Heading 3

1.8 em

Heading 4

1.6 em

Heading 5
1.3 em
Heading 6
1.0 em