I am trying to use h1 tags on my blog for the post title and came across one problem.
Title is hyperlinked.
so
Case 1:
<h1> <a href=""> xyz </a> </h1>
case 2:
<a href=""> <h1> xyz</h1> </a>
which one is better in terms of SEO ?
|
I am trying to use so Case 1:
case 2:
which one is better in terms of SEO ? |
||||
|
|
|
If you are using HTML5, just pick one; they're equivalent. Anything else(XHTML, HTML 4, etc) and the second one is just plain wrong. It wouldn't be valid code, and on some level that's bad for your search optimization. [Insert standard disclaimer about how much any single offense really affects anything, etc.] |
|||
|
|
|
They're the same as far as SEO is concerned. (Usually block level elements contain inline elements and not vice-versa so you should use the first example but it won't affect SEO). |
|||||||||||
|
|
I find that with Case 2 the href insert is often out of line with the rest of my page. But that could be the way I set my margins in my .css. Thus I would favour Case 1. |
|||
|
|
|
|
|||
|
|