<input disabled>

Attribute of
<input> HTML Tag
What does <input disabled> do?
Disables the input field.

Code Example

 <label for="disabled">Disabled</label><br>
 <input name="disabled" value="You cannot edit me." disabled>

disabled vs. readonly

The disabled and readonly attributes have similar effects — in fact, they look the same from the user’s perspective. In both cases, what the user sees is a field that is slightly “grayed out”, which cannot be clicked on or edited.

 <label for="disabled">Disabled</label><br>
 <input name="disabled" value="disabled" disabled>
 <label for="readonly">Readonly</label><br>
 <input name="readonly" value="readonly" readonly>

However, they are different and using the wrong one can cause problems.

If a field is disabled, the value of the field is not sent to the server when the form is submitted. If a field is readonly, the value is sent to the server.

Protip: If there is some reason that you _really_ do not want a particular field’s value to be included in a form submission request, you might want to look at your server-side form handling. It is possible for a malicious user to override your form input’s disabled attribute and send whatever form data they like. This is true of any element, actually — never forget to consider server-side form validation and sanitizing.
This is the mysterious user account for the HTML.com admin.

Browser Support for disabled