Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

All attributes must have values

In HTML, a number of attributes have no explicit value. This type of attribute is called minimized because there is only one value for it. For example, take the <option> tag:

<option value="1" selected>

The attribute selected has been minimized. The fact that it is there at all tells the HTML browser to display the option as selected.

In XHTML, there is no such thing as an attribute without a value. You must supply a value and the value must be the name of the attribute itself. For example:

This HTML…

Becomes this in XHTML…

<input type="radio" checked>

<input type="radio" checked="checked" />

<input type="checkbox" checked>

<input type="checkbox" checked="checked" />

<dl compact>

<dl compact="compact">

<hr noshade>

<hr noshade="noshade" />

The attribute value might be meaningless and it makes the code more complicated but you have to have it. Hard luck.