### What is the difference between `em` and `rem` units?

#### Answer

Both `em` and `rem` units are based on the `font-size` CSS property. The only difference is where they inherit their values from.

* `em` units inherit their value from the `font-size` of the parent element
* `rem` units inherit their value from the `font-size` of the root element (`html`)

In most browsers, the `font-size` of the root element is set to `16px` by default.

#### Good to hear

* Benefits of using `em` and `rem` units

##### Additional links

* [CSS units for font-size: px | em | rem](https://medium.com/code-better/css-units-for-font-size-px-em-rem-79f7e592bb97)

<!-- tags: (css) -->

<!-- expertise: (1) -->

<!-- Expertise levels:
	0: junior
	1: intermediate
	2: senior
-->
