Disabled vs Readonly

Written by Mandy. Posted in HTML.

I often forget the differences between a form element that is disabled to a form element that is readonly.

From the interface perspective, both usually achieve what I desire - prohibiting the end user from changing a value that is calculated or pre-set, but is necessary to have on the form.

I have extracted these differences from the Definition by W3C.

Disabled Controls Read-only Controls
Definition When set for a form control, this boolean attribute disables the control for user input. When set for a form control, this boolean attribute prohibits changes to the control.
Syntax disabled readonly
Effects on an element
  • Disabled controls do not receive focus.
  • Disabled controls are skipped in tabbing navigation.
  • It cannot receive user input nor will its value be submitted with the form.
  • Disabled controls cannot be successful.
  • Read-only elements receive focus but cannot be modified by the user.
  • Read-only elements are included in tabbing navigation.
  • Read-only elements may be successful.
Supported Attributes:



About Me

I currently specialise in developing bespoke applications using Oracle APEX.I have worked with APEX since it was known as HTMLDB, but have also dabbled with E-Business Suite, Oracle AS Portal, ECM, Webcenter and Website Design.

I enjoy working with new clients and assisting them develop custom applications to enhance and improve internal business processes.

Find Me

mandy nerd2