Directing a text link to a different part of the same page

Discussion in 'HTML & Website Design' started by MarkStrobel3367, Dec 24, 2010.

  1. #1
    How do I go about having a text link direct the viewer to the part of the same page where that specific information can be found so that viewers do not have to do a lot of scrolling before reaching the desired info? Thanks.
     
    MarkStrobel3367, Dec 24, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    The link
    
    <a href="#headerone">Go to One</a>
    
    Code (markup):
    Content header
    
    <h2 id="headerone">One</h2>
    
    Code (markup):
     
    radiant_luv, Dec 24, 2010 IP
  3. WC Rocket

    WC Rocket Member

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #3
    This also works when directing a link to a specific part of a different page.
     
    WC Rocket, Dec 27, 2010 IP
  4. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #4
    The name property is also possible, instead of id ;)

    But afaik it does not work when linking from a different page, maybe I am wrong about it.
     
    CSM, Dec 27, 2010 IP
  5. MarkStrobel3367

    MarkStrobel3367 Well-Known Member

    Messages:
    116
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    Thank you so much!! Your suggests were very helpful!! I wish you and your families a Happy New Year!!!
     
    MarkStrobel3367, Jan 1, 2011 IP