form state pseudo-classes

Pseudo-classes such as :checked, :invalid and :disabled that match form controls by their current state.

In more detail

They update automatically as the user interacts with the form. Combined with :has(), they let a container react to its fields, for example highlighting a label whose checkbox is ticked.

Related terms

Taught in

References