# em unit

*noun*

say it: **“EM YOO-nit”** **/ɛm ˈjunɪt/**

A CSS unit of size equal to the font size of the element it's used on (for font-size itself, the parent's font size), so 2em on 20px text is 40px.

## What is the **em** unit?

An **em** is the current element's font size. `2em` means twice the font size, so spacing grows with the text.

```css
.button { font-size: 18px; padding: 0.5em 1em; }   /* 9px 18px */
```

## In a sentence

- “I set the button's padding with the **em unit**, so bigger buttons get more padding without any extra rules.”

Level: Novice · [More CSS terms at this level](https://www.ask-codey.com/glossary?category=css&level=1)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/em-unit
