I wish to markup a heading which is also a regular hyperlink.
Do I put the heading inside the link?
Or the link inside the heading?
h3 is a block-level element, and
a is an inline element, so you put the
a inside the
h3. You're not supposed to put a block-level element inside an inline element.
As Kelley said, the correct answer is to place the link inside the heading.
The semantics of this are that the heading's purpose is to identify a section of content. It also happens to link to something. If the link contained the heading, the link would technically be an inline element of the previous section heading level, so the heading in question would be a child of that - probably not your intent.