Tidy 74

From Htmlpedia
Jump to: navigation, search

Tidy: ... cannot copy name attribute to id


In XHTML, the "name" attribute has been deprecated and replaced by the "id" attribute. If you want to keep both tags for compatibility reasons, the values should be the same. This error is generated when only the "name" attribute exists and that tidy try to copy the value of the name in the id attribute. But an "id" must begin with a letter (A-Za-z).


Bad<a name="123456">...</a>
Bad<a id="123456">...</a>
Good<a id="my_link">...</a>
Good<a id="my_link" name="my_link">...</a>


Use "id" instead of "name" or use both with identical values.