Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Anchor tag inside H1 or H1 inside achor tag : Which is better?
Why, on StackExchange sites, is the post title on the question page a link to itself?

Assuming, that I have an article page:

http://example.com/articles/article-title

with the main content like:

<h2 id="main">Article title</h2>

Regarding the SEO and semantic reasons, should I wrap the H2 tag/content in link?

e.g.

<h2 id="main"><a href="/articles/article-title" title="Article title content">Article title</a><h2>

or this way:

<a href="/articles/article-title" title="Article title content"><h2 id="main">Article title<h2></a>

(the H1 in this particular case is reserved for the topic of the whole website, and linked to the home page.)

As for the end user, clicking this link seems pointless, as this would just do a page refresh. But I sill see those headings linked all around.

share|improve this question

marked as duplicate by w3dk, Lèse majesté, Hamlet Dec 30 '12 at 21:53

This question was marked as an exact duplicate of an existing question.

1  
Linking the heading in this way isn't entirely pointless... webmasters.stackexchange.com/questions/23917/… – w3dk Dec 30 '12 at 20:29

Browse other questions tagged or ask your own question.