pseudo-class

:disabled — CSS reference

Matches a control disabled under HTML rules, including applicable disabled fieldsets. An arbitrary element with a disabled attribute is not necessarily disabled.

Formal Syntax & Structure

css syntaxcss
:disabled

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:disabled { color: rgb(0, 96, 80); }</style></head><body><label>A <input id="a" class="sample" disabled></label><label>B <input id="b" class="sample" ></label></body></html>
CSS Reference