Forum Moderators: open
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:<body id="top">
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:
<p>
<a name="bad-example">
</a>
</p>
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.