checked="checked" is required for XHTML compliance. XML requires that
all attributes have values.
Please refer to http://www.w3.org/TR/xhtml1/#4.5:
> 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.
>
> CORRECT: unminimized attributes
>
> <dl compact="compact">
>
> INCORRECT: minimized attributes
>
> <dl compact>
The XHTML spec further states that this applies to the attributes:
compact, nowrap, ismap, declare, noshade, checked, disabled, readonly,
multiple, selected, noresize and defer.
Merely closing empty elements (as you imply) is not sufficient.
In my experience this usage does not break in any of the version 4.0 or
newer browsers.
cheers,
jon.
> Subject: RE: radio buttons for selecting each version of a ca
> lculator? From: "SEAK, Teng-Fong" <tfseak@f...> Date: Mon,
> 3 Mar 2003 17:29:19 +0100 X-Message-Number: 14
>
> checked is a boolean attribute, so it's not necessary (or maybe even
> prone to error) to write checked="checked"
>
> Just write <input type="radio" name="multiplier" checked /> is
> enough.
>
> And also be careful of the typo of name.
--
jon stephens
<zontar@m...>
http://hiveminds.info/ HiveMinds Group
http://phpuddi.sourceforge.net/ phpUDDI Project
http://www.wrox.com/ Wrox Press "Programmer To Programmer"
http://www.glasshaus.com/ glasshaus "Web Developer To Web Developer"