The disabled attribute is a boolean that makes a form control not editable, not focusable, and not submitted. Users cannot click or tab into it; browsers usually show it grayed out.
fieldset disabled disables descendant form controls.
You do not needdisabled on every nested input.
HTML exception: controls inside the <legend> are not disabled by the fieldset flag.
Re-enable by removing the attribute (or setting fieldset.disabled = false).
Edge Cases & Pitfalls
Most bugs come from expecting a disabled value on the server or mixing it with validation attributes.
submit
Values are omitted
Never rely on a disabled field arriving in POST/GET data. Mirror it with a hidden input if needed.
validation
required has no effect
Disabled controls skip constraint validation. Do not combine required with disabled on inputs.
a11y
Explain why it’s off
Gray alone is not enough. Add nearby text (or enable the control) so users know how to proceed.
firefox
Button state may persist
Firefox can keep a dynamically disabled <button> state across reloads. Use autocomplete to control that behavior if needed.
css
Style with :disabled
Supporting elements with the attribute match :disabled; without it they match :enabled.
Compatibility
Browser Support
disabled is an HTML attribute for form controls in the browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
disabled
Supported everywhere modern browsers run. Behavior (no focus, no submit, gray styling) is consistent across Chrome, Firefox, Safari, and Edge.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetModern
Full support
Internet ExplorerAll
Supported
disabledWidely supported
Bottom line: Safe to use on all form UIs. Remember disabled values never reach the server — plan readonly or hidden fields when you still need the data.
Remember
Key Takeaways
Boolean: presence disables the control — no focus, no edit, no submit.
fieldset disabled turns off nested controls in one step.
One line:disabled fully deactivates a control — use readonly when the value must still be sent.
Frequently Asked Questions
It makes a form control not editable, not focusable, and not submitted with the form. Browsers usually gray it out and ignore clicks and focus.
button, fieldset, input, optgroup, option, select, and textarea. A disabled fieldset disables its descendant form controls (with a legend exception).
Yes. Presence means disabled. Write disabled or disabled="". In JavaScript use element.disabled = true or false.
readonly blocks editing but the control stays focusable and its value is still submitted. disabled blocks interaction and excludes the value from submission.
No. Disabled controls are not successful controls, so their values are omitted from the form data set.
No. A disabled control does not take part in constraint validation, and required must not be used together with disabled on inputs.