February 2025posted on 02.22.2025There are 44 CSS length units Adam Argyle has written a Codepen that lists the different units. To learn more about what each unit means: Adam Argyle: New CSS Relative Units CSS length CSS Values and Units W3C CSS Values and Units Relative UnitDefinition%Percentage of the parent element's font sizeemFont size of the elementexHeight of the element's fontchWidth of the "0" (zero) character of the element's fontcapHight of the capital letters of the element's fonticAdvance measure of the 水 CJK (Chinese/Japanese/Korean) character of the element's fontlhHeight of the element's line height Root Relative UnitDefinitionremFont size of the root elementrexHeight of the root element's fontrchWidth of the "0" (zero) character of the root element's fontrlhHeight of the root element's line heightricAdvance measure of the 水 CJK (Chinese/Japanese/Korean) character of the root element's fontrcapHeight of the capital letters of the root element's font Absolute UnitDefinitionpxPixelsptPointspcPicasinInchescmCentimetersmmMillimetersQQuarter-millimeters Viewport UnitDefinitionvwViewport widthvhViewport heightviViewport inchesvbViewport breadthsdvwDynamic viewport widthdvhDynamic viewport heightdviDynamic viewport inchesdvbDynamic viewport breadthssvwSmallest possible viewport widthsvhSmallest possible viewport heightsviSmallest possible viewport inchessvbSmallest possible viewport breadthslvwLargest possible viewport widthlvhLargest possible viewport heightlviLargest possible viewport incheslvbLargest possible viewport breadthsvminSmallest value between the viewport's width and heightvmaxLargest value between the viewport's width and height Container See CSS Container Queries. UnitDefinitioncqwContainer widthcqhContainer heightcqiContainer inchescqbContainer breadthscqminSmallest value between the element's parent container's width and heightcqmaxLargests value between the element's parent container's width and heightNo reactions yet
There are 44 CSS length units
Adam Argyle has written a Codepen that lists the different units.
To learn more about what each unit means:
Relative
水CJK (Chinese/Japanese/Korean) character of the element's fontRoot Relative
水CJK (Chinese/Japanese/Korean) character of the root element's fontAbsolute
Viewport
Container
See CSS Container Queries.