I read the same question on SO, but it was only addressing HTML complaint point of view. Moreover with HTML5 it does not make so much difference. I assume (without anything to back up my assumption), that the first approach is might be better from SEO point of view.

So is there any difference?

  • 2
    What is ceo? I think you are saying about SEO.. May 1, 2014 at 4:44
  • @SathiyaKumar thanks for edit. You are correct :-) May 1, 2014 at 4:52

1 Answer 1


I believe it doesn't matter for SEO. It's HTML5, it is (almost) a standard, they simply "aren't allowed" to give you bad credit.

I think this is more of a UX question. A header is a block level element and will be 100% width. An anchor is inline and will only wrap the text.

With that knowledge, you have two options:

  • Wrap the <h1> around the <a> -> only the text is clickable
  • Wrap the <a> around the <h1> -> the whole line is now clickable

In the end you'll get the most points if users stay on your site, better UX helps with that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.