HTML <input> disabled Attribute
Example
<input type="text" id="fname" name="fname" disabled>
Meaning
The disabled attribute is used to turn off a form control.
Elements will not be submitted, nor will they receive any focus from the keyboard or mouse.
The browser also might gray out the form that is disabled, to indicate to the user that the form control is inactive.
Disabled input in a form will not be submitted.
Standard Syntax
HTML: <input disabled>
XHTML: <input disabled="disabled" />
Advertisement
Attribute Values
| Value | Description |
|---|---|
| disabled | This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. |