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

Jens Brueckmann jens.brueckmann at gmail.com
Tue Aug 19 06:30:40 CDT 2008

> 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>

Hi Nadeem,

option a) is perfectly ok.
Option b) is invalid markup, as block-level elements such as H2 are
not allowed inside anchor elements A.


Jens Brueckmann

More information about the thelist mailing list