a in h2, or h2 in a

Giganews Newsgroups
Subject: a in h2, or h2 in a
Posted by:  Atanas Boev (sun-alabala-c…@cs.tut.fi)
Date: Sat, 3 Jan 2004

I have a heading that I would like to link to site section, in the following
context:

<h1>Site Contents</h1>
<h2>First Section</h2>
<h2>Second Section</h2>
<h2>Third Section</h2>

I want that the section headings are poining to the relevant sections of the
site. Since I am not specialist, excuse me if it is a stupid question, but
which is better (in sence of good html):

<a href="section1"><h2>First Section<h2></a>

- or -

<h2><a href="section1">First Section</a></h2>?

At least I noticed that some (older) browsers tend to render it diferenly if
I use a:hover.

Thanks for your time,
suncho

Replies