Attribute: Disabled

The disabled attribute specifies that the input field is disabled. A disabled element is un-usable and un-clickable and will not be submitted.

HTML file: Displayed by browser:
<form>
First name:
<br /><input type="text" name="firstname" value="John" disabled>
<br />
<br />Last name:<br />
<input type="text" name="lastname">
</form>
First name:


Last name:

The disabled attribute does not need a value. It is the same as writing disabled="disabled".

Back button Table of Contents Next button