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
How to use the CSS Units Reference
- Type a unit name or a category such as viewport or angle.
- Check what the unit is relative to before you use it.
- Copy the example and swap in your own value.
Features
- Absolute and font relative length units
- Viewport and container query units
- Angle, time, resolution and frequency units
- Search across units, notes and examples
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