Q:

em vs rem

em -> is relative to the font-size of its direct or nearest parent 
rem -> is relative to the html (root) font-size
1
1EM or 1REM (r = root em)
The difference is inheritance.
The Rem value is based on the root element (html).
What is meant here is the font size for html and not the font size for the documet body.
... Em is based on the font size of each
Parent element.
1

New to Communities?

Join the community