# There are 44 CSS length units

[Adam Argyle](https://nerdy.dev/) has written a [Codepen](https://codepen.io/argyleink/pen/oNxbNzy) that lists the different units.

To learn more about what each unit means:
- [Adam Argyle: New CSS Relative Units](https://nerdy.dev/new-relative-units-ric-rex-rlh-and-rch)
- [CSS length](https://developer.mozilla.org/en-US/docs/Web/CSS/length)
- [CSS Values and Units](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Values_and_Units)
- [W3C CSS Values and Units](https://www.w3.org/TR/css-values-4)

## Relative

| Unit | Definition |
|------|------------|
| % | Percentage of the parent element's font size |
| em | Font size of the element |
| ex | Height of the element's font |
| ch | Width of the "0" (zero) character of the element's font |
| cap | Hight of the capital letters of the element's font |
| ic | [Advance measure](https://developer.mozilla.org/en-US/docs/Glossary/Advance_measure) of the `水` CJK (Chinese/Japanese/Korean) character of the element's font |
| lh | Height of the element's line height |

## Root Relative

| Unit | Definition |
|------|------------|
| rem | Font size of the root element |
| rex | Height of the root element's font |
| rch | Width of the "0" (zero) character of the root element's font |
| rlh | Height of the root element's line height |
| ric | [Advance measure](https://developer.mozilla.org/en-US/docs/Glossary/Advance_measure) of the `水` CJK (Chinese/Japanese/Korean) character of the root element's font |
| rcap | Height of the capital letters of the root element's font |

## Absolute

| Unit | Definition |
|------|------------|
| px | Pixels |
| pt | Points |
| pc | Picas |
| in | Inches |
| cm | Centimeters |
| mm | Millimeters |
| Q | Quarter-millimeters |

## Viewport

| Unit | Definition |
|------|------------|
| vw | Viewport width |
| vh | Viewport height |
| vi | Viewport inches |
| vb | Viewport breadths |
| dvw | Dynamic viewport width |
| dvh | Dynamic viewport height |
| dvi | Dynamic viewport inches |
| dvb | Dynamic viewport breadths |
| svw | Smallest possible viewport width |
| svh | Smallest possible viewport height |
| svi | Smallest possible viewport inches |
| svb | Smallest possible viewport breadths |
| lvw | Largest possible viewport width |
| lvh | Largest possible viewport height |
| lvi | Largest possible viewport inches |
| lvb | Largest possible viewport breadths |
| vmin | Smallest value between the viewport's width and height |
| vmax | Largest value between the viewport's width and height |

## Container

See [CSS Container Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries).

| Unit | Definition |
|------|------------|
| cqw | Container width |
| cqh | Container height |
| cqi | Container inches |
| cqb | Container breadths |
| cqmin | Smallest value between the element's parent container's width and height |
| cqmax | Largests value between the element's parent container's width and height |