checked Attribute


 

Where to use the checked Attribute


Description

The checked attribute is a Boolean attribute which when present indicates that the checkbox should initially be checked (for input type="checkbox") or that the radio button should initially be "on" (for input type="radio").

For a checkbox, if the checked attribute is not present, the checkbox should be initially unchecked.

For a set of radio buttons (all having the same name attribute), it is invalid to have more than one button "on" at any one time so only one radio button within the set should be assigned the checked attribute. In fact, the *HTML 4 specification for radio buttons states that one radio button of a set should always be designated as initially "checked".

See also the selected 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) > checked Attribute (XHTML 1.1)