Converter Web ToolsConverter WebTools

CSS Units Reference — px, em, rem, vw, vh

This CSS units reference explains absolute and relative length units in CSS — px, em, rem, %, vw, vh and more — so you know when to use each for responsive design.

UnitType — meaning
pxAbsolute — one device pixel
ptAbsolute — 1/72 inch (print)
in / cm / mmAbsolute — physical length
emRelative — to the element font-size
remRelative — to the root font-size
%Relative — to the parent value
vw1% of viewport width
vh1% of viewport height
vmin1% of the smaller viewport side
vmax1% of the larger viewport side
chWidth of the "0" character
exHeight of the lowercase x
frFraction of free space (grid)

Related tools & charts