PDA

View Full Version : link directing user to particular section of the page



charcola
10-31-2007, 10:27 PM
Hi, I'm a newbie at this forum and not too sure if this is the right place to ask this question. Please help!

I'm creating a html page with lots of info in it. So I would like to create several links toward the top of the page that would allow users to skip the long contents and go directly to the sections they want to see on the page when they click on one of these links.:confused:

djr33
10-31-2007, 10:59 PM
<a name="jumptohere">

<a href="#jumptohere">clickme</a>

Note that it's also accessible with # from other pages, so mypage.htm#start will automatically jump to #start once it's loaded.

(The name is without the #, and the # acts as a marker-- so don't use that for the name="" element.)

charcola
10-31-2007, 11:12 PM
Wow! Thanks so much for such a quick response. =)
Now I get it!

But can you show me with an example how this option becomes accessible even with other pages?

Do I write:
<a href="jumptohere.html#jumptohere">clickme</a>

djr33
10-31-2007, 11:27 PM
<a href="nameofpage.htm#anchorname">...


And on nameofpage.htm, you'd place
<a name="anchorname">

By the way, that requires a close tag, so it's like
<a name="abc"></a>
Or you could display text as the anchor, such as using the header, like <a name="html">HTML Tutorial!</a>

charcola
10-31-2007, 11:31 PM
soooooo cool!!! thanx a lot!!!!! =)