CSS · Selectors and cascade

:checked

Matches checked radio buttons and checkboxes, or selected options.

Syntax
:checked

Example

Try it

Notes

Pair it with a visible label change so the state is obvious.

More in this group

::after ::before ::placeholder ::selection :active :disabled :empty :first-child

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course