Em

Em is a relative unit, which means it is relative to the font size of the parent element. 2em means double the size of the parent element. For example, consider the font size of the page to be 14px, then 1em is equal to 14px, 2em is equal to 28px, and so on. It is directly proportional. This em property helps web developers resize text size easily throughout a website by changing a single parent font size.

Em unit is not limited to font size but is also used for margin, padding, height, and width. Em unit can be used to change the size easily, it works on mobile, and helps websites adapt to all screen sizes and resolutions. All these features make em unit favourable for web designers.