Rem
Root element's font size. In other words, it is the font size of the html element.
If no font size is specified on the html element, it is determined by the browser's font size setting which has a default of 16px.
Em
Current element's font size. For example, let's say you have a button with a font size of 20px. If you define the padding to be 2em, the size of the padding will be 40px.
Top comments (0)