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;
}
According to this article by Vincent De Oliveira, the font-size
actually has nothing to do with the actual height of characters. It's not even the height of the inline element that contains text.
Of course, a larger value of the font-size
property results in a larger text. But the pixel value does not directly translate into the actual size of text.
However, the pixel value of font-size
sets the size of 1em
to be used for setting margin, padding, etc.