How to use h1 tag for SEO purpose
I have heard that in SEO h1 receives more importance than other items like <a> or p or anything So I am trying to use h1 in a situation but I am not quite sure that will it be considered as standard and will google account for it in the same as an ordinary h1 tag.

Let me explain by an example for better understanding, I have something like this <li class="selected"><a href="#">All</a></li>
now what I think is legal is this to put h1 first and then use a tag so it will be like this <h1><a>All</a><h1> but the problem is that if I use this then my jquery thing stops working as it wants the a tag first. 
So what I did is this <a><h1>All</h1></a> as you can see in this I used a first and h1 as second tag, so what do you think is it according to the standards and most important will GOOGLE look at it as a LINK or as a H1 tag? 
How to use h1 tag for SEO purpose
===

I have heard that in SEO h1 receives more importance than other items like <a> or p or anything So I am trying to use h1 in a situation but I am not quite sure that will it be considered as standard and will google account for it in the same as an ordinary h1 tag.

Let me explain by an example for better understanding, I have something like this <li class="selected"><a href="#">All</a></li>
now what I think is legal is this to put h1 first and then use a tag so it will be like this <h1><a>All</a><h1> but the problem is that if I use this then my jquery thing stops working as it wants the a tag first. 
So what I did is this <a><h1>All</h1></a> as you can see in this I used a first and h1 as second tag, so what do you think is it according to the standards and most important will GOOGLE look at it as a LINK or as a H1 tag? 