| REM | PX |
|---|---|
| 0.5rem | 8px |
| 0.75rem | 12px |
| 0.875rem | 14px |
| 1rem | 16px |
| 1.25rem | 20px |
| 1.5rem | 24px |
| 2rem | 32px |
| 3rem | 48px |
| 4rem | 64px |
REM (Root EM) is a CSS unit relative to the root element <html> font size. Browser default is 16px.
PX (Pixel) is the absolute pixel unit in CSS, representing a physical or logical screen pixel.
Formulas:
REM โ PX: rem value ร root font size = px value
PX โ REM: px value รท root font size = rem value
Using REM helps maintain proportional consistency across different devices and font settings โ a recommended practice in modern responsive design.