Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
A simpler method (and much better than using the old-style name attribute on an anchor) is to use an id attribute on the body element:
My vote for tip of the day.
W3C - Anchors [w3.org]
The destination anchor of a link may be an element within an HTML document. The destination anchor must be given an anchor name and any URI addressing this anchor must include the name as its fragment identifier.
Destination anchors in HTML documents may be specified either by the A element (naming it with the name attribute), or by any other element (naming with the id attribute).
I admit to having a lot of old websites or pages that still have a lot of:
but I also still run into a lot of people that still using this sort of markup.
id="best-practice" is my friend.
Used to have to wrap the fragment identifiers in a <p> because pages wouldn't validate if one just slid the <a> in the page; though they worked.