Advanced Search

Results 1 to 5 of 5

Thread: link directing user to particular section of the page

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default link directing user to particular section of the page

    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.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    <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.)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    <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>
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    soooooo cool!!! thanx a lot!!!!! =)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •