5 PX to EM
Result
5 px = 0.3125 em
Explanation
- Base — 16
- EM — 0.3125
To convert 5 pixels to EM with base 16 you need to divide pixels value by base value, in our case: 5 / 16. In result we'll receive that 5 pixels with base 16 is equal to 0.3125 em
CSS code for 5 PX to EM
p { font-size: 0.3125em }
HTML (inline CSS):
<p style="font-size: 0.3125em">Hello World<p>