2

Possible Duplicate:
Semantically, which is more correct: a in h2, or h2 in a?

I'm a little worried how this might affect SEO. Should <a> be placed inside an <h2> tag,

<h2><a href="#">Yey Me!</a></h2>

or vice versa?

<a href="#"><h2>Yey Me!</h2></a>

DOCTYPE: html5

Community
  • 1
  • 1
Jürgen Paul
  • 14,299
  • 26
  • 93
  • 133

1 Answers1

3

If you really want to get pedantic, personally, I'd say put the <h2> outside the <a> tag. It doesn't really matter though in my experience (which, admittedly, isn't that much).

Elliot Bonneville
  • 51,872
  • 23
  • 96
  • 123