# rem unit

A size equal to the root (html) font size, usually 16px.

## What is the **rem** unit?

A **rem** is the font size of the root `<html>` element (usually 16px). Unlike `em`, it doesn't change with nesting, and it respects the user's font settings.

```css
h1 { font-size: 2rem; }      /* 32px by default */
.card { padding: 1.5rem; }   /* 24px */
```

Level: Novice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/novice)

Updated: September 27, 2026

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