Name attribute is obsolete, what is the correct behavior when dealing with anchors?

Posted by Tchalvak on Pro Webmasters See other posts from Pro Webmasters or by Tchalvak
Published on 2011-04-22T19:09:48Z Indexed on 2012/12/07 11:20 UTC
Read the original article Hit count: 212

Filed under:
|

Putting some code through the html5 validator, I get this:

Warning: The name attribute on the a element is obsolete. Consider putting an id attribute on the nearest container instead.

I find that unclear. Is the "nearest container" for an anchor link the a itself, so that the correct code would be <a id='blah'> instead of <a name='blah'>? Or are empty placeholder <a> tags as a whole deprecated, and anchors can simply point to any element with an id instead?

© Pro Webmasters or respective owner

Related posts about html5

Related posts about anchor