pseudo-class

:enabled — CSS reference

Matches controls that can be disabled but are currently enabled. It is not the complement of disabled for arbitrary elements.

Formal Syntax & Structure

css syntaxcss
:enabled

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Selector lab</title><style>:where(.sample) { color: rgb(32, 32, 32); }input:enabled { color: rgb(0, 96, 80); }</style></head><body><label>A <input id="a" class="sample" ></label><label>B <input id="b" class="sample" disabled></label></body></html>
CSS Reference