Using SELECTED in XHTML

Hi there,<br />
<br />
Is there any way to use the SELECTED or CHECKED attribute in the OPTION element while remaining XHTML valid?<br />
<br />
...or is there a simple javascript way around the problem?<br />
<br />
Thanks in advance,<br />
Tim.<!--content-->From the XHTML 1.0 Specificaation:<br />
XML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute names such as compact and checked cannot occur in elements without their value being specified.<br />
<br />
CORRECT: unminimized attributes<br />
<br />
<dl compact="compact"><br />
<br />
INCORRECT: minimized attributes<br />
<br />
<dl compact><br />
<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/#h-4.5">http://www.w3.org/TR/xhtml1/#h-4.5</a><!-- m --><!--content-->
 
Back
Top