rem units are based on the
font-size CSS property. The only difference is where they inherit their values from.
emunits inherit their value from the
font-sizeof the parent element
remunits inherit their value from the
font-sizeof the root element (
In most browsers, the
font-size of the root element is set to
16px by default.
- Benefits of using