pseudo-class

A selector keyword starting with a colon, such as :hover, :checked or :has(), that matches elements by state or relationship rather than by name.

In more detail

Most pseudo-classes add the same specificity as a class. Functional ones such as :is(), :where() and :has() take selector lists as arguments.

Related terms

Taught in

References