# clamp()

Keeps a value between a minimum and maximum, flexible in between.

## What does `clamp()` do?

`clamp()` keeps a value between a minimum and a maximum while letting it grow in between. It is great for text that scales with the screen.

```css
h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
```

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

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/clamp
