The disabled attribute

disabled makes a form element inactive — unresponsive to interaction, skipped by Tab, and its value is NOT submitted with the form.

Applies to

input, button, select, textarea, fieldset, option

Values

A boolean attribute: its mere presence disables the element.

Example

<button type="submit" disabled>Please wait...</button>

Edge cases

  • Unlike readonly, a disabled field's value is not included in the submitted form data at all.
  • disabled on a fieldset disables every form element inside it at once.

Accessibility

  • Disabled elements drop out of the Tab order and aren't announced as interactive — make sure that's actually the behavior you want, not just a "looks inactive" style.

Related tools