HTML and CSS Reference
In-Depth Information
Name
:disabled
Applies to:
Any element
Description:
Matches user interface elements that are not able to accept user input because of language at-
tributes or other nonpresentational means; for example,
<input type="text" disabled>
in
HTML5. Note that
:disabled
does notapply when an
input
element has simply been re-
moved from the viewport with properties like
position
or
display
.
Examples:
input:disabled {opacity: 0.5;}