2 PX to REM

Open PX to REM converter

Result

2 px = 0.125 rem


Explanation

  • REM — 0.125
  • Pixel base — 16

To convert 2 pixels to REM with pixel's base 16 you need to divide pixels value by base value, in our case: 2 / 16. In result we'll receive that 2 pixels with base 16 is equal to 0.125 rem

2 / 16 = 0.125 rem

CSS code for 2 PX to REM

p { font-size: 0.125em }

HTML (inline CSS):

<p style="font-size: 0.125em">Hello World<p>