Linking with #

Discussion in 'HTML & Website Design' started by n1ck, Nov 14, 2007.

  1. #1
    Ok this is so noobish, but I can't think of how to use # to link on the same page.
    For instance,
    <a href="#blah">
    HTML:
    Now what would i put where that blah section is on the page?

    I haven't done anything like this in quite a while and I can't remember what its called to look it up. Thanks.
     
    n1ck, Nov 14, 2007 IP
  2. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #2
    I think back in the old days, developers linked it to elements with a name attribute that had a value equal to the href.

    Would link to

    But nowadays (and especially if you're using XHTML where name is deprecated on all but some form elements) you should link it to an element that has an ID with a value equal to your href.

     
    soulscratch, Nov 14, 2007 IP
  3. n1ck

    n1ck Active Member

    Messages:
    197
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #3
    Ah thank you very much exactly what I needed. :)
     
    n1ck, Nov 14, 2007 IP