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