# Container name

*noun*

say it: **“kun-TAY-ner NAYM”** **/kənˈteɪnər neɪm/**

A CSS property that gives a measured box a name, so a container query can say exactly which box it means instead of using the nearest one.

## What does `container-name` do?

`container-name` names a query container so a query can target that one specifically.

```css
.sidebar { container: sidebar / inline-size; }
@container sidebar (min-width: 300px) { .widget { padding: 24px; } }
```

## In a sentence

- “I set the **container name** to bike-spot, so the card's query checks that box and not the one inside it.”

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

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/container-name
