In HTML, you can have empty attributes, without even ="":

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

However, in XHTML, you need at least an empty string:

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

What is the equivalent of the empty HTML attribute in XHTML? Is it an empty string, or the attribute name as a string, or true, or something else?

有帮助吗?

解决方案

http://www.w3.org/TR/2000/REC-xhtml1-20000126/#h-4.5

Equivalent of the empty HTML attribute in XHTML is attribute name.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top