disabled Attribute


 

Where to use the disabled Attribute


Description

The disabled attribute is a Boolean attribute which may be specified on many form elements to state that the element in question should be initially non-functional.

Users cannot interact with disabled controls (if a button, it cannot be pressed, if an input field, the text may not be altered, etc.) and no name=value pair is sent to the processing URI for that element on submission of the form.

Disabled controls are usually greyed out to distinguish them visually from functional controls. They cannot receive focus and do not participate in the tabbing order of the page (see the tabindex attribute). Initially disabled controls can subsequently be enabled using, for example, JavaScript code.

Note: If you are writing code which needs to be compatible with Internet Explorer, you should bear in mind that IE does not support the disabled attribute on option or optgroup elements.

The disabled attribute is not present in the *W3C XHTML 1.1 Basic Forms Module.

See also the readonly attribute.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > disabled Attribute (XHTML 1.1)