My document is getting some errors when using the W3C validator because some of my <a> tags have “name” attributes. It says that the “name” attribute is obsolete. When and why did this happen???
Secondly, I am using rel="something" with a few links when using a certain jQuery functions. This is also causing validation errors as the “rel” tags are not “valid”.
So, the following link would throw two validation errors:
<a href="index.php" name="somename" rel="reltag">Link</a>
My question is, is this something I should concern myself with, or is the validator just being overly picky in this instance?
HTML 4 (in around 1998) introduced a generic
idattribute that did everything thenameattribute on<a>elements did (except work in Netscape 4) but wasn’t limited to<a>elements. XHTML 1.1 officially deprecatednameon<a>.The draft HTML 5 specification for
relis, frankly, a mess (it limits values to ones in the spec … and those in a wiki). However, most instances I’ve seen of JS usingrelare using it incorrectly (as a generic place to store data and not as a place to describe a relationship between the current document and the document at the end of the link). Useclassinstead.