CSS unit cheatsheet

One line per unit: what it equals and whether you can rely on it. Print it, or keep it open next to your editor.

Baseline marks

Each mark is a symbol and a word, so the sheet still reads in black and white.

Safe to use
In every main browser for 30 months or more
Use with a fallback
In every main browser, for less than 30 months
Limited support
Missing in at least one main browser
Not usable
No property accepts it in any main browser

Absolute 7 units

Reference The CSS pixel

  • px1px = 1/96in Safe to use
  • pt1pt = 1/72in = 4/3px Safe to use
  • pc1pc = 12pt = 1/6in = 16px Safe to use
  • in1in = 96px = 2.54cm = 72pt = 6pc Safe to use
  • cm1cm = 96px / 2.54 ≈ 37.795px Safe to use
  • mm1mm = 1/10cm ≈ 3.7795px Safe to use
  • Q1Q = 1/40cm = 0.25mm ≈ 0.945px Safe to use

Font-relative 12 units

Reference Font size and glyph metrics

  • em1em = the font-size of the element; in font-size itself, the parent's Safe to use
  • rem1rem = font-size of :root (16px unless the reader changed the browser default) Safe to use
  • ch1ch = advance width of "0" in the element's font (0.5em if it cannot be measured) Safe to use
  • rch1rch = the value of ch on the root element Use with a fallback
  • ex1ex = x-height of the element's font (0.5em if it cannot be determined, as the specification has it) Safe to use
  • rex1rex = the value of ex on the root element Use with a fallback
  • cap1cap = cap height of the element's font (the ascent of the font if it cannot be determined, as the specification has it) Safe to use
  • rcap1rcap = the value of cap on the root element Use with a fallback
  • ic1ic = advance of 水 (U+6C34) in the element's font (1em if it cannot be measured) Safe to use
  • ric1ric = the value of ic on the root element Use with a fallback
  • lh1lh = used line-height of the element Safe to use
  • rlh1rlh = used line-height of :root Safe to use

Percentage 1 unit

Reference Another value

  • %N% = N/100 × the reference value of the property Safe to use

Viewport 24 units

Reference The viewport

  • vw1vw = 1/100 of the viewport width Safe to use
  • vh1vh = 1/100 of the viewport height (the large viewport) Safe to use
  • vi1vi = 1/100 of the viewport size in the inline direction Safe to use
  • vb1vb = 1/100 of the viewport size in the block direction Safe to use
  • vmin1vmin = 1% of min(viewport width, viewport height) Safe to use
  • vmax1vmax = 1% of max(viewport width, viewport height) Safe to use
  • svw1svw = 1/100 of the width when browser toolbars are fully shown Safe to use
  • svh1svh = 1/100 of the height when browser toolbars are expanded Safe to use
  • svi1svi = 1/100 of the small viewport in the inline direction Safe to use
  • svb1svb = 1/100 of the small viewport in the block direction Safe to use
  • svmin1svmin = 1% of min(svw, svh) Safe to use
  • svmax1svmax = 1% of max(svw, svh) Safe to use
  • lvw1lvw = 1/100 of the width when browser toolbars are retracted Safe to use
  • lvh1lvh = 1/100 of the height when browser toolbars are retracted Safe to use
  • lvi1lvi = 1/100 of the large viewport in the inline direction Safe to use
  • lvb1lvb = 1/100 of the large viewport in the block direction Safe to use
  • lvmin1lvmin = 1% of min(lvw, lvh) Safe to use
  • lvmax1lvmax = 1% of max(lvw, lvh) Safe to use
  • dvw1dvw = 1/100 of the current visible width Safe to use
  • dvh1dvh = 1/100 of the currently visible height Safe to use
  • dvi1dvi = 1/100 of the current viewport in the inline direction Safe to use
  • dvb1dvb = 1/100 of the current viewport in the block direction Safe to use
  • dvmin1dvmin = 1% of min(dvw, dvh) Safe to use
  • dvmax1dvmax = 1% of max(dvw, dvh) Safe to use

Container 6 units

Reference The nearest query container

  • cqw1cqw = 1/100 of the nearest container's width Safe to use
  • cqh1cqh = 1/100 of the nearest container's height Safe to use
  • cqi1cqi = 1/100 of the nearest container's inline size Safe to use
  • cqb1cqb = 1/100 of the nearest container's block size Safe to use
  • cqmin1cqmin = min(1cqi, 1cqb) Safe to use
  • cqmax1cqmax = max(1cqi, 1cqb) Safe to use

Flexible 1 unit

Reference Free space in a grid

  • fr1fr = one part of the space left after fixed tracks and gaps Safe to use

Special 12 units

Reference Its own type

  • deg360deg = 400grad = 2π rad = 1turn Safe to use
  • grad400grad = 360deg = 1turn Safe to use
  • rad2π rad = 360deg = 1turn Safe to use
  • turn1turn = 360deg = 400grad = 2π rad Safe to use
  • s1s = 1000ms Safe to use
  • ms1ms = 0.001s Safe to use
  • Hz1Hz = 1 cycle per second Not usable
  • kHz1kHz = 1000Hz Not usable
  • dpi1dpi = 1/96dppx Safe to use
  • dpcm1dpcm = 2.54dpi Safe to use
  • dppx1dppx = 96dpi = 1x Safe to use
  • x1x = 1dppx = 96dpi Safe to use

Support data: MDN browser-compat-data 8.1.7, checked 2026-11-01