Example
A disabled button is marked up as follows:<button type="button" disabled="disabled">Click Me!</button>
Definition and Usage
The disabled attribute specifies that a button should be disabled.
A disabled button is unusable and un-clickable.
The disabled attribute can be set to keep a user from clicking on the button until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript is required to remove the disabled value, and make the button usable.
Browser Support
The
disabled attribute supported in all major browsersSyntax
<button disabled="value">
Attribute Values
| Value | Description |
|---|---|
| disabled | Disables a button |
Was this information helpful?

