Value for font-size and font-weight

Why is it that the numerical value for font-size ends with “px” while with font-weight it does not?

Well, to be honest I’ve never asked myself this question but I checked stackoverflow and this is what I found:

Why font-weight is in hundreds?

Apparently it derives from the Linotype typeface classification system (Linotype). Where a 3-number system is used, first numeral describes font weight, second numeral describes font width, third numeral describes position.
Stackoverflow post

There is also an article with some further reading.

1 Like

Because font weights are not in px, they’re named values (“bold”, “light”, “black” etc) or a number (100, 200, thru 900). It makes no sense for the weight to be in pixels, it’s just an arbitrary name for a certain style of a font family, it bears no relation to any measure (edit: yes there is a classification system, but don’t expect it to actually relate to anything very specific IRL. 400 is visually heavier then 200, medium/book/regular will be heavier than light/extra-light/hairline/whatever (some lines will be thicker, shapes will be adjusted), 700 is heavier than 400, bold/dark/black will be heavier than medium/book/regular (some lines will be thicker, shapes will be adjusted). That’s all it signifies, practically.

1 Like