[thelist] A (simple?) HTML question...

Symeon Charalabides symeon at systasis.com
Tue Aug 19 08:11:09 CDT 2008

>  I've arrived at a point of indecision over something that looks like it
>  should be simple, straight-forward and in the domain of common knowledge but
>  I can't find any solutions on the net.
>  Which is better? And why?
>  a) Link inside H2: <h2><a href="url">Heading</a></h2>
>  OR
>  b) H2 inside link: <a href="url"><h2>Heading</h2></a>

Regarding structure, ^^ what Jens and Ben said: a) is the way to go. Now, regarding SEO...

>  I'm leaning towards option (b) because I *think* it's better for SEO... but
>  I'm not sure.

Why do you think that? Google parses all your HTML elements it's interested in whether they're nested inside other interesting elements or not. So the URL will be parsed in both cases.

As for case b), Google will not attach more value to your hyperlink because it's wrapped inside H2 elements. If that worked, we'd all wrap all our hyperlinks in H1 elements and the practice would soon be rendered meaningless.

My 2c,

Symeon Charalabides (cosmopolite trainee)

More information about the thelist mailing list