Skip to content

CSS Selectors

Enabled

About

The :enabled pseudo-class matches elements that are not disabled, like inputs or buttons.

Input

Normal inputs are considered enabled.

Read-only Input

Read-only inputs are also considered enabled because they can still be focused.

Disabled Inputs

In contrast to read-only inputs, cannot receive focus. They don't match the :enabled selector.

Buttons

Buttons match if they are not disabled.