Rumus konversi: rem = px / 16. Contoh: 24px = 1.5rem, 32px = 2rem.
PX to EM / REM Converter
Contoh Kode PX to EM / REM Converter:
<!DOCTYPE html>
<html>
<body style="font-family: sans-serif;">
<h3>Tabel Konversi Cepat</h3>
<ul>
<li>12px = 0.75rem</li>
<li>16px = 1.0rem</li>
<li>24px = 1.5rem</li>
<li>32px = 2.0rem</li>
</ul>
</body>
</html>
Uji dan amati bagaimana deklarasi CSS PX to EM / REM Converter mengubah tampilan elemen di atas.