![]() |
|
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:
The attribute value might be meaningless and it makes the code more complicated but you have to have it. Hard luck. |
More information So how is XHTML different to HTML? All attributes need double quotes All attributes need values |