<button disabled>
Disabled Button
</button>
In the above example we add the disabled
attribute to a button control.
disabled
AttributeThe autofocus
attribute disables the control. Therefore, if the user tries to use the control, nothing will happen.
This attribute is a boolean attribute. Therefore, if it is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace (i.e. either disabled
or disabled="disabled"
).
Possible values:
<button>
ElementThe <button>
element creates a button control in an HTML document.
Any contents of the <button>
element appears on the button.
The <button>
element can be associated with a form or stand alone by itself (in such case it could have JavaScript attached via the onclick
attribute) to make the button actually do something.