# Pseudo-class

*noun*

say it: **“SOO-doh klas”** **/ˈsuːdoʊ klæs/**

A word after a colon that adds a condition to a selector, such as a state (hovered, focused, checked) or a position (first, every other). li:hover is read "li when hovered".

## What is a **pseudo-class**?

A **pseudo-class** styles an element in a certain state or position, like hovered, focused or first in a list. It starts with one colon.

```css
button:hover { background: darkblue; }
li:first-child { font-weight: bold; }
```

## In a sentence

- “I used the **pseudo-class** :nth-child(odd) to shade every other row of the playlist.”

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

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/pseudo-class
