When setting CSS font-size in pixels, does the value refer to the width or height of a letter?

css, html

Solution

The height - specifically from the top of the ascenders (e.g., 'h' or 'l' (el)) to the bottom of the descenders (e.g., 'g' or 'y'). See the interesting article on Type Anatomy at http://en.wikipedia.org/wiki/Typeface_anatomy.

Problem

Does the pixel value of a font-size refer to the height of the font or the width of the font? CSS: ``` .sixteen { font-size: 16px; } ``` HTML: ``` <span class='sixteen'>a</span> ``` Will the "a" be 16 pixels tall or 16 pixels wide, or is that like a max-width/height on both so that the entire character fits in a 16px box? All the documentation I have seen for this has been ambiguous on the matter.

Original source