<h1> and Links

Discussion in 'Search Engine Optimization' started by Kaizoku, Dec 22, 2007.

  1. #1
    Is it better to wrap it around the whole link or around the anchor text?

    
    <h1><a href='link.php' title='keyword'>keyword</a></h1>
    
    HTML:
    or
    
    <a href='link.php' title='keyword'><h1>keyword</h1></a>
    
    HTML:
    Or does it matter at all? also, is it same for h2, h3, strong and bold?
     
    Kaizoku, Dec 22, 2007 IP
  2. billybw

    billybw Peon

    Messages:
    1,012
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have <h1> around the anchor text on some links on one of my sites. I've had it that way for more than two years, and it has never been a problem, and some of the linked pages are number 1 in Google for their main keyword. So that seems to work.

    But I don't know for sure if it makes any difference or not.
     
    billybw, Dec 22, 2007 IP
  3. gtull1

    gtull1 Guest

    Messages:
    619
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good question. Hope you get some good answers. My guess is that it doesn't matter, but that's just a guess.
     
    gtull1, Dec 22, 2007 IP
  4. AHA7

    AHA7 Peon

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Heading tags are applied to inner HTML text ("keyword" in the examples above) so either way should have the same effect. I don't know if SE's care if heading tags are wrapping or wrapped by link tags but they shouldn't IMHO.
     
    AHA7, Dec 22, 2007 IP
  5. wierdo

    wierdo Well-Known Member

    Messages:
    1,646
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    #5
    I would put the tag around the anchor.
     
    wierdo, Dec 22, 2007 IP
  6. NirMorgo

    NirMorgo Peon

    Messages:
    136
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think that it would be much wiser to put your href inside your <H1>

    I'm not sure what are the seo effects of doing the opposite
    but it will put order in your html source text, and will be easier to change later
    you should keep your html pages as clean as you can, and try to avoid mess

    doing:
    <a href='link.php' title='keyword'><h1>keyword</h1></a>

    is messy, if you do that you will just have problems finding your headers
     
    NirMorgo, Dec 23, 2007 IP
  7. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #7
    Thanks for the answers, guess to be on the safe side, I will just wrap it around the anchor text :)
     
    Kaizoku, Dec 23, 2007 IP
  8. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I would recommend inserting the anchor tag INSIDE the heading tag. Reason? Well, you should create an anchor for the words, and not for the tag itself.
     
    Philopoemen, Dec 23, 2007 IP