1

Me and a fellow webdeveloper are having a discussion about whether or not this is SEO-friendly. I think it's okay to have an anchor <a> tag wrapped around a div. As it's perfectly valid in HTML5.

However, he says it's bad for SEO. As the <h1> tag will lose value in terms of SEO.

The HTML:

<a href="/link">
    <div>
        <h1>Header </h1>
        <img />
        <p>Some test</p>
        <span>SPAN ACTING LIKE A LINK HERE</span>
    </div>
</a>

Does the <h1> lose value cause of this? We want the entire div to be clickable (for user experience) but don't want to make the <h1> lose value in terms of SEO.

Community
  • 1
  • 1
Daan
  • 2,680
  • 20
  • 39
  • Maybe this helps you and your friend to end the discussion : http://webmasters.stackexchange.com/questions/20446/anchor-tag-inside-h1-or-h1-inside-achor-tag-which-is-better – lulululululull Jun 29 '16 at 09:15
  • I'm voting to close this question as off-topic because it is asking for SEO advice. It might be on-topic on [webmasters.se]. – unor Jun 29 '16 at 15:00

1 Answers1

0

If you are using HTML5, they're both the same.

As HTML5 does allow block-level links.

If your markup is valid, you do not lose any SEO value. More important is actually the quality of your link and text within.

GibboK
  • 71,848
  • 143
  • 435
  • 658