CSS Units Reference

Absolute and relative lengths plus angle, time, resolution and frequency units, with what each one is relative to.

Search CSS units

Showing 0 units
Lengths such as rem and em depend on their context, so the same value can render at different sizes.

How to use the CSS Units Reference

  1. Type a unit name or a category such as viewport or angle.
  2. Check what the unit is relative to before you use it.
  3. Copy the example and swap in your own value.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online css units reference.

A pixel is an absolute CSS unit, while rem scales with the root font size, so it responds to user settings.
Em is relative to the font size of the element itself, so nested elements compound when sizes are set in em.
Viewport units are percentages of the browser viewport, so 50vw is half of the viewport width.
Vh assumes a fixed viewport height, while dvh updates when mobile browser bars appear or disappear.
Use ch to size text blocks by character count, so a max width of 60ch gives about sixty characters per line.
Fr is a flexible grid track unit that distributes the free space left in the container.
Percentages depend on the containing block and can cause unexpected sizes, so fixed or relative units are often clearer.
One turn equals a full 360 degree rotation, so 0.25turn is a quarter turn clockwise.
Yes. It is completely free, needs no account and works entirely in your browser without any tracking.

Last updated: October 10, 2026