CSS em (em)

Typography unit · Non-system units

All units Typography converter

The CSS em is a font-relative length unit in the W3C CSS specification, equal to the computed font size of the element on which it is used — or, inside the font-size property itself, the computed font size of the parent element. Its symbol is em. At the standard 16-pixel browser default without nested scaling, 1 em equals 16 CSS pixels.

The name descends from hot-metal typesetting, where the capital letter M sat on an approximately square lead block whose width matched the point size of the fount. Printers called that square spacing piece an em quad — or mutton, to distinguish it aloud from the narrower en quad, or nut — and set indents, dashes and spaces in ems so proportions stayed balanced at every type size.

CSS adopted em in its original 1996 specification for scalable web typography. On font-size declarations, however, parent-relative inheritance compounds across nested layers: a 1.25 em list inside a 1.25 em panel renders at 1.5625 times the base size. That quirk inspired root-relative rem, yet local proportionality remains em's distinctive strength elsewhere.

Applied to padding, margins, border radii or inline icons, em binds a component's geometry directly to its own text size. A button styled with 0.5 em vertical and 1.25 em horizontal padding keeps balanced breathing room whether rendered as a compact 13-pixel tag or a 24-pixel hero banner, needing no extra override rules. Paragraph indents of 1.5 em and reading measures of 30 to 40 em carry centuries of book craft directly to screens.

Inside CSS media queries, browsers evaluate em against the user's default font preference rather than page overrides, letting responsive layouts adapt cleanly when readers enlarge browser text.

Outside a live element tree, converters use the universal 16-pixel unscaled browser baseline, matching twelve points and one pica.

One CSS em equals 16 CSS pixels (at the standard 16-pixel browser default), 12 points, 1 pica, 1 CSS rem, 240 twips, about 4.2333 CSS millimetres, or about 0.1667 CSS inches.

CSS em conversion table

UnitSymbol1 CSS em equals1 of these equalsConverter
CSS pixelpx16 px0.0625 emCSS ems to CSS pixels
Pointpt12 pt0.0833333333333 emCSS ems to Points
Picapc1 pc1 emCSS ems to Picas
CSS remrem1 rem1 emCSS ems to CSS rems
Twiptwip240 twip0.00416666666667 emCSS ems to Twips
CSS millimetermm CSS4.23333333333 mm CSS0.236220472441 emCSS ems to CSS millimeters
CSS inchin CSS0.166666666667 in CSS6 emCSS ems to CSS inches