:disabled
W3C CSS Snapshot 2026
Match a form control that the user cannot currently operate.
On this page
Syntax and values
| Value or syntax | What it does |
|---|---|
button:disabled | Matches disabled buttons. |
Try the example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>:disabled</title>
<style>
button:disabled { opacity: .55; }
</style>
</head>
<body>
<button type="button">Open schedule</button>
<button type="button" disabled>Unavailable</button>
</body>
</html>
What to expect Unavailable appears faded and cannot be pressed.