What is CSS rem unit?

The rem unit is relative to the font-size of the root element (html). By default, 1rem equals 16px if the root font-size is unchanged.

html { font-size: 16px }1rem = 16px2rem = 32px

Frequently Asked Questions about rem units

Why use rem over px?
rem units scale with the user's preferred font size settings, making your site more accessible.
What's the default value of 1rem?
By default, 1rem equals 16px, but this can change if the user modifies the root font size.