# Pseudo-class

Styles an element in a state, like :hover, with one colon.

## 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; }
```

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

Updated: September 27, 2026

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