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.
| Unit | Symbol | 1 CSS em equals | 1 of these equals | Converter |
|---|---|---|---|---|
| CSS pixel | px | 16 px | 0.0625 em | CSS ems to CSS pixels |
| Point | pt | 12 pt | 0.0833333333333 em | CSS ems to Points |
| Pica | pc | 1 pc | 1 em | CSS ems to Picas |
| CSS rem | rem | 1 rem | 1 em | CSS ems to CSS rems |
| Twip | twip | 240 twip | 0.00416666666667 em | CSS ems to Twips |
| CSS millimeter | mm CSS | 4.23333333333 mm CSS | 0.236220472441 em | CSS ems to CSS millimeters |
| CSS inch | in CSS | 0.166666666667 in CSS | 6 em | CSS ems to CSS inches |