[Anchor 1] [Anchor 2] [Anchor 3]

The first named anchor is in the middle of this paragraph block element. In fact, the actual location of the named anchor is immediately following this sentence and before the next sentence. You can see that clicking the link that targets this named anchor brings the line of text containing the named anchor to the top of the browser window. If you now make the width of the browser window smaller so that the named is in a different line of text, clicking the link now brings that line to the top of the window.
back to top

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

A level two (H2) heading.

The second named anchor is immediately preceeding the level two heading. A common use is to place named anchors immediately before sub-headings in the document, keeping links at the top which act like a table of contents for the document.
back to top

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

babble

A level three (H3) heading.

The third named anchor is immediately preceeding the level three heading. The reason this heading does not go all the way to the top of the browser window is that there is not enough stuff below the anchor. That is, a browser will not fabricate blank lines at the bottom of a page just so it can bring a named anchor to the top. If it's imperative that this anchor goes to the top, you can add enough BR elements at the bottom giving the browser ample page to work with below the anchor.

The reason for all of the extra babble in this document is so that there is plenty of page to allow the first two named anchors to go to the top. Named anchors are not very effective in short documents.
back to top