What Is The Correct Alternative For The Attribute "name"?
When I validate this page with the w3c validator, I am told that 'the name attribute is obsolete,' however, I cannot find an alternative. Every article I can find about linking wit
Solution 1:
You can skip to any element with specified identifier like that:
<divid="navigation"></div><divid="content"></div><divid="footer"></div><ahref="#navigation">Skip to navigation</a>
Solution 2:
you can use a class name or an id:
<aid="top"></a><aclass="top"></a>
or you can assign multiple class to make it more specific
<aclass="link top"></a>
or with html5 you can do this:
<adata-name="top" ></a>
Solution 3:
in the old days, speek html 4, you could to internal links like:
<a href="#bottom">link</a>
and the target would be
<aname="bottom"></a>
Now this days we do it like that:
<a href="#bottom">link</a>
target:
<foo id="bottom"></foo>
You see i use foo, because it can be whatever element you like
Post a Comment for "What Is The Correct Alternative For The Attribute "name"?"