REM vs EM – The Great Debate

REM vs EM – The Great Debate

One of the best practices to typography on the web is to use relative units like rem and em.

[…]

In this article, you’re going to find my take on rem vs em. You’re also going to learn exactly what rem and em are, and how to use them to build modular components.

This statement doesn’t make sense on the web since we don’t use point-size. It makes complete sense if we substituted point-size with font-size though.

What it means is: 1em = 20px if a selector has a font-size of 20px.

The em unit can be used to declare font-sizes. In fact, it’s a best practice to use relative units like em for font-size.

[…]

When put this way, we can see that the computed value of