HTML to enable "instant" scrolling thru long posts : LUSENET : TimeBomb 2000 (Y2000) : One Thread


For anyone posting a question or answer that's longer than a few screens worth, it might worth employing the HTML constructs that I am using here. First, to see the effect, click on the above link labeled "TO END OF POST", and then click on "TO START OF POST" to scroll back to the top.

The best way to understand how to do it would be to look at this thread's "source" to see what I've done. Here are some useful tidbits:

1. The a href construct, which most frequently is used to link to URLs, is in this case used to link to an anchor (basically, just a place) within the current document (thread in this case). The # symbol that begins the link name designates it as an anchor (as opposed to a URL).

2. The a name construct defines the anchor, that is, where you scroll to by clicking at the a href.

3. In giving the anchor a name, using a nonsensical sequence of letters and/or numbers will help ensure that it's unique within the thread. Otherwise, clicking on the link might scroll to someone else's anchor instead of your own.

4. Finally, the anchor may be used as a sort of indexing mechanism to various sections within a long post. In doing this, you will want to give a visible name to the anchor. I refrained from doing so in this post, as the "TO START..." and "TO END..." seemed self-explanatory.

Hope I did it right. Have fun.


-- David L (, December 28, 1999



Don't Ctrl+Home (to the top of the page)and Ctrl+End (to the bottom of the page) do what you're describing, or have I misunderstood? Are you saying that the HTML anchors are for going to the beginning or end (and points in-between?) of a particular post within a thread? I'll have to give it a try...thanks!

-- (, December 28, 1999.

Well I'll be! You learn something everyday HERE.

-- Tommy Rogers (Been there@Just a, December 28, 1999.

You can also link to anchors that appear previous in a thread. For example, the following will take you to the anchor at the end of my original post:

To End of Original Post

One complication is that an earlier post cannot link to a later one, so if you clicked to go back up, it may be time consuming to return to where you had been. However, if an anchor had been defined near where you wish to return, you can easily get there by positioning the cursor at the end of the box in your browser that shows the current URL, and then typing "#" followed by the anchor you wish to reach, and hitting Enter. For your enjoyment, I've placed an anchor below that you can reach using this technique (after first scrolling up). So to return to this point, you'd append "#3456" to the URL that's displayed by your browser.

Anchor 3456

-- David L (, December 30, 1999.

Oops, forgot something. If the URL displayed by your browser already references an anchor (which it will if you've just "jumped" to one), then navigating to a different anchor will require replacing the URL's current anchor with the one you now wish to reach.

I think this stuff is neat. Better enjoy it while we can. 8^)

-- David L (, December 30, 1999.

Moderation questions? read the FAQ