Skip to content

CSS Selectors

Checked

About

The :checked pseudo-class matches checkboxes, radio buttons and select options that are currently checked / selected.

Checkbox

Checkboxes match if they are checked.

  • Check the checkbox to match the selector

Radio Buttons

A radio button matches if it's selected.

  • Select a radio button to match the selector

Select

A select option matches if it's selected. This works for single and multiselect elements, but options of a single select element cannot be styled.

  • Select an option to match the selector