| CSS rems (rem) | CSS ems (em) |
|---|---|
| 1 CSS rem | 1 em |
| 2 CSS rems | 2 em |
| 3 CSS rems | 3 em |
| 4 CSS rems | 4 em |
| 5 CSS rems | 5 em |
| 10 CSS rems | 10 em |
| 20 CSS rems | 20 em |
| 25 CSS rems | 25 em |
| 50 CSS rems | 50 em |
| 100 CSS rems | 100 em |
| Reference | CSS rems (rem) | CSS ems (em) |
|---|---|---|
| Standard printed book body text | 0.916667 rem | 0.916667 em |
| Default browser root font size | 1 rem | 1 em |
| Minimum accessible mobile tap target | 3 rem | 3 em |
| One CSS reference inch | 6 rem | 6 em |
The CSS rem is a font-relative length unit in the W3C CSS layout system, equal to the computed font size of a document's root html element. Its symbol is rem, short for root em. Under the universal 16-pixel default font size shipped by desktop and mobile browsers, 1 rem equals 16 CSS pixels, or 12 points.
Introduced in CSS Values and Units Level 3 and supported across mainstream browsers since the early 2010s, rem solved a notorious maintenance headache of the older em unit. Because em scales relative to an element's parent, nested components multiplied silently: a 0.9 em caption inside a 0.9 em card shrank to 0.81 em, and a third layer fell to 0.729 em. Anchoring every calculation to the single root element eliminated cascading drift.
The unit's greatest practical virtue is accessibility. Hard-coded px font sizes can override a reader's chosen browser text preference, whereas sizing headings, paragraphs and spacing in rem lets low-vision users raise their browser default from 16 px to 24 px and watch the entire interface scale harmoniously with its visual hierarchy intact.
Design systems routinely define modular type and spacing scales in rem: 0.875 rem (14 px) for captions, 1 rem (16 px) for body prose, 1.5 rem (24 px) for subheadings and 2.5 rem (40 px) for display titles, paired with 0.25 rem (4 px) spacing steps. An older habit set the root size to 62.5 per cent (10 px) for easy mental maths, though modern teams keep the 16-pixel root intact so third-party widgets do not shrink unexpectedly.
Because rem has no fixed physical magnitude outside a stylesheet, adjusting the root font size rescales an entire page at once — a clean lever for global density controls.
Conversion tables evaluate 1 rem at the standard 16-pixel browser default, where it aligns directly with one pica and twelve points.
One CSS rem equals 16 CSS pixels (at the standard 16-pixel browser default), 12 points, 1 pica, 1 CSS em, 240 twips, about 4.2333 CSS millimetres, or about 0.1667 CSS inches.
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.