# Class selector

*noun*

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

A CSS selector starting with a dot that picks elements with that class, such as .price.

## What is a **class selector**?

A **class selector** starts with a dot and picks every element with that class. It is the most common way to style things.

```css
.btn-primary { background: royalblue; color: white; }
/* <button class="btn-primary">Buy now</button> */
```

## In a sentence

- “The **class selector** .sale makes every sale price red.”

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/class-selector
