From Htmlpedia
Contents |
[edit]
OpenSP: Value of attribute ... cannot be ...; must be one of ...
[edit]
Cause:
The value of the attribute is defined to be one of a list of possible
values but in the document it contained something that is not allowed
for that type of attribute. For instance, the “selected” attribute must be either
minimized as “selected”
or spelled out in full as “selected="selected"”; a value like
“selected="true"” is not
allowed.
[edit]
Example:
In XHTML, unlike in HTML, attribute minimization is not allowed:
![]() | <td nowrap> |
![]() | <td nowrap="nowrap"> |
[edit]
Solution:
In XHML, the values of the attributes of attributes without values have changed like this:
| HTML | XHTML |
|---|---|
| compact | compact="compact" |
| checked | checked="checked" |
| declare | declare="declare" |
| defer | defer="defer" |
| disabled | disabled="disabled" |
| ismap | ismap="ismap" |
| multiple | multiple="multiple" |
| nohref | nohref="nohref" |
| noshade | noshade="noshade" |
| nowrap | nowrap="nowrap" |
| noresize | noresize="noresize" |
| readonly | readonly="readonly" |
| selected | selected="selected" |
[edit]
References:
- W3 validator: http://validator.w3.org/
- HTML Tags: http://www.w3.org/TR/html4/index/elements.html
- Difference with HTML 4: http://www.w3.org/TR/xhtml1/#h-4.5


