# Selector

*noun*

say it: **“suh-LEK-ter”** **/səˈlɛktər/**

The part of a CSS rule that picks which elements the rule styles.

## What is a **selector** in CSS?

A **selector** picks which elements a rule applies to, by tag name, class, id or other traits.

```css
p { }          /* every paragraph */
.card { }      /* elements with class="card" */
#header { }    /* the element with id="header" */
```

## In a sentence

- “The **selector** .price picks every element with the class price.”

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

Updated: November 9, 2026

## In other subjects

- [Selector in Angular](https://www.ask-codey.com/glossary/selector-angular)

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