I am trying to use
<h1> tags on my blog for the post title and came across one problem. Title is hyperlinked.
<h1> <a href=""> xyz </a> </h1>
<a href=""> <h1> xyz</h1> </a>
Which one is better in terms of SEO?
If you are using HTML5, just pick one; they're equivalent.
Anything else (XHTML, HTML4, 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