HTML <input> disabled Attribute

The disabled attribute on an  input  tag disables the input element. It appears grayed out and is unusable.

Example

#

A disabled attribute on an  input  element.
The input field is not usable and its value is not included during form submission.



<form action="/tutorial/action.html">
  <label for="name">Name</label>
  <input disabled type="text" id="name" name="name"><br /><br />
  
  <input type="submit">
</form>

Using disabled

The disabled attribute specifies that the input element is disabled.

The input element appears grayed out and is unusable.

Disabled input elements are excluded from form submission.


Syntax

<input disabled>
or
<input disabled="disabled">

Values

#

Value Description
disabled Use value 'disabled' or no value at all. Both are valid.

Browser support

Here is when disabled support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <input>
Guides