Skip to content

CSS Selectors



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


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


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