In how many categories is Input Pseudo Classes divided?

These pseudo-classes relate to form elements, and enable selecting elements based on HTML attributes and the state that the field is in before and after interaction.

We split it into three categories:

Category 1

  • Enabled
  • Disabled
  • Read Write

Category 2

  • Default
  • Checked
  • Indeterminate

Category 3

  • Valid
  • Invalid
  • Optional

enabled :

Represents a user interface element that is in an enabled state.

disabled :

Represents a user interface element that is in a disabled state.

read-only :

Represents any element that cannot be changed by the user.

read-write :

Represents any element that is user-editable.