The unit of measure EM in CSS is a unit of measure with relative properties whose value depends on the font size of the parent element. The EM unit does not have a full and definite measure. The value really depends on the active font-size. Conversion is based on the default font-size size of 16 pixels, but can be changed.
The EM unit here is not an abbreviation, so it will not have an abbreviation. But is as a pronunciation on the letter "M". The letter "M" is a unit commonly used in measurement in typography. The letter "M" is defined as the active measuring point (point) of the normal width of the uppercase M. For example, for a letter with a value of 12 points, 1em is equivalent to the distance of 12 points and 2em is equivalent to the distance of 2 x 12 points ( 24 points).
| PX | EM |
|---|---|
| 1px | 0.06em |
| 2px | 0.13em |
| 3px | 0.19em |
| 4px | 0.3em |
| 5px | 0.3em |
| 6px | 0.4em |
| 8px | 0.5em |
| 10px | 0.6em |
| 12px | 0.8em |
| 14px | 0.9em |
| 15px | 0.9em |
| 16px | 1em |
| 18px | 1.1em |
| 20px | 1.3em |
| 24px | 1.5em |
| 25px | 1.6em |
| 28px | 1.8em |
| 32px | 2em |
| 36px | 2em |
| 40px | 3em |
| 44px | 3em |
| 48px | 3em |
| 50px | 3em |
| 56px | 4em |
| 64px | 4em |
| 72px | 5em |
| 75px | 5em |
| 80px | 5em |
| 90px | 6em |
| 100px | 6em |
In using the EM unit in CSS, if the active element has a font size of 18px, the 1em value will be 18px and the 2em will be 2 x 18px (32px). If the active font size is 2cm, the value of 1em is 2cm. If the active font size is 2in, the value of 1em is 2in.