Unit comparison
First value
Second value
-
-
Unit reference
| Absolute units | |||
|---|---|---|---|
| Unit | Description | Visualization | Computed value (px) |
| cm | centimeters | - | |
| mm | millimeters | - | |
| Q | quarter-millimeters | - | |
| in | Inch (1in = 96px) | - | |
| pc | Pica (1pc = 16px) | - | |
| pt | points (1pt = 1/72in) | - | |
| px | pixels (relative to the device) | - | |
| Relative units | |||
| Unit | Description | Visualization | Computed value (px) |
| em | relative to the element font size | - | |
| rem | relative to the root element font size | - | |
| ex | relative to the height of character "x" | - | |
| ch | relative to the width of character "0" | - | |
| vw | 1% of viewport width | - | |
| vh | 1% of viewport height | - | |
| vmin | 1% of the smaller viewport dimension | - | |
| vmax | 1% of the larger viewport dimension | - | |
| % | relative to the parent element (usually width) | - | |
| cap | relative to capital-letter height | - | |
| ic | relative to ideographic-character width | - | |
| lh | relative to its own line height | - | |
| rlh | relative to the root element line height | - | |
| vi | relative to viewport inline size | - | |
| vb | relative to viewport block size | - | |