cm |
Centimeters 1cm = 37.8px = 25.2/64in |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
mm |
Millimeters 1mm = 1/10th of 1cm |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
Q |
Quarter-millimeters 1Q = 1/40th of 1cm |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
in |
Inches 1in = 2.54cm = 96px |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
pc |
Picas 1pc = 1/6th of 1in |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
pt |
Points 1pt = 1/72nd of 1in |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
px |
Pixels 1px = 1/96th of 1in |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
em |
Font size of the parent, in the case of typographical properties like font-size, and font size of the element itself, in the case of other properties like width. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
ex |
x-height of the element’s font. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
ch |
The advance measure (width) of the glyph “0” of the element’s font. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
rem |
Font size of the root element. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
lh |
Line height of the element. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
rlh |
Line height of the root element. When used on the font-size or line-height properties of the root element, it refers to the properties’ initial value. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vw |
1% of the viewport’s width. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vh |
1% of the viewport’s height. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vmin |
1% of the viewport’s smaller dimension. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vmax |
1% of the viewport’s larger dimension. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vb |
1% of the size of the initial containing block in the direction of the root element’s block axis. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
vi |
1% of the size of the initial containing block in the direction of the root element’s inline axis. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
svw, svh |
1% of the small viewport’s width and height, respectively. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_unitss |
lvw, lvh |
1% of the large viewport’s width and height, respectively. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |
dvw, dvh |
1% of the dynamic viewport’s width and height, respectively. |
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units |