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.

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

Level: Apprentice · More CSS terms at this level

Updated