jjshell — 2011-08-12T05:15:42-04:00 — #1
so that users can reach a section of the page they're currently browsing.
Is this technique ok? Is there something more clever to do in our day and age?
felgall — 2011-08-12T05:45:01-04:00 — #2
That's only useful for Netscape 4 and earlier. Most modern browsers no longer support it since there was a new way introduced into the standards back in 1997 and apart from Netscape all other browsers since that time have supported the newer way.
Just add an id attribute to whatever tag you want to use as the destination of your link.
For example if you want to jump to the div that contains the navigation then just use <div id="nav"> and then <a href="#nav">go to nav</a> will jump you straight to it.
glennforum — 2011-08-13T01:09:49-04:00 — #3
I agree, the use of the id attribute has changed the name attribute and with HTML 5 who knows whats next.
tenfingers — 2011-08-14T17:44:17-04:00 — #4
One thing is for sure: the name attribute on an anchor is obsolete in HTML5. (See, W3C HTML5 overview, 11 Obsolete features.)