Loading...
6 pixels converts to 0.375em when the parent element's font-size is 16px. Unlike REM (which is relative to the root), EM is relative to the parent element's font-size. If the parent font-size differs from 16px, the em value changes.
Formula
6px ÷ 16 = 0.375em
/* 6px as em (parent font-size: 16px) */
.parent {
font-size: 16px;
}
.child {
font-size: 0.375em; /* 6px */
}EM is relative to the parent element's font-size, while REM is relative to the root (html) font-size. Use EM for component-internal sizing and REM for global consistency. 6px = 0.375em (parent 16px) = 0.375rem (root 16px).
A value of 6px (0.375em) is commonly used for fine details, small borders, and micro spacing relative to the parent element. EM units are ideal for component-level sizing where elements should scale relative to their parent, not the root.
| px | em |
|---|---|
| 8 | 0.5 |
| 10 | 0.625 |
| 12 | 0.75 |
| 14 | 0.875 |
| 16 | 1 |
| 18 | 1.125 |
| 20 | 1.25 |
| 24 | 1.5 |
| 32 | 2 |
| 48 | 3 |
Convert any value instantly with our free PX to EM Converter.
Open PX to EM Converter →