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?
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.
I agree, the use of the id attribute has changed the name attribute and with HTML 5 who knows whats next.
One thing is for sure: the name attribute on an anchor is obsolete in HTML5. (See, W3C HTML5 overview, 11 Obsolete features.)
This topic is now closed. New replies are no longer allowed.