Type a size in px, rem, em, pt or another CSS unit to see it in all the others. The root font size is 16 px unless you change it, as in every browser by default.
Converted by this page:
| px | rem |
|---|---|
12 | 0.75 |
14 | 0.875 |
16 | 1 |
18 | 1.125 |
20 | 1.25 |
24 | 1.5 |
32 | 2 |
48 | 3 |
rem sizes follow the reader’s chosen font size: someone who sets their browser to larger text gets larger text and spacing. px sizes don’t. Use rem for type and most spacing, px for hairlines and borders.
Divide by the root font size: 24 px ÷ 16 = 1.5 rem.
Setting html { font-size: 62.5% } makes 1 rem 10 px, so sizes are easy to work out. Set the root size here to 10 to match.
Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.