Within an article-oriented page (such as a blog post), the <h1>
element (level 1 heading) is commonly used to markup either:
- the blog title (i.e. the often-large site title at the top of the page, not to the
<title>
element), or - the article title
What is the best choice and why?
To the site owner, who may want to shout out to the world the name of their site/blog, using a level 1 heading around the site title might seem to make sense.
From the perspective of what you are trying to communicate to the user, the site title is of less relevance - the article content is what you're trying to communicate and all other site content is secondary. Therefore using <h1>
for the article title seems best.
I feel the <h1>
element should focus on the article title, not the site title or other content. This does not appear to be a popular convention by any means.
Examples:
- Joel Spolsky uses
<h1>
for the article title, and an anchor for the site title - Jeff Atwood uses no
<h1>
at all,<h2>
for the article title and an anchor for the site title - 37 Signals' SVN uses
<h1>
for the site title and an anchor for the article title
That's three different approaches across three sites where you might expect a strong consideration for correct semantic markup.
I think Joel has it right with Jeff a close second. I'm quite surprised at the markup choices by the 37Signals people.
To me it seems quite a simple decision: what is of greatest relevance to the consumer of the article? The article title. Therefore wrap the article title in an <h1>
element. Done.
Am I wrong? Are there further considerations I'm missing? Am I right? If so, why is the '<h1>
for article title' approach not more commonly used?
Is the decision of where to use the <h1>
element as invariable as I put it? Or are there some subjective considerations to be made as well?
Update: Thanks for all the answers so far. I'd really appreciate some angle on how the use of the <h1>
for the article title instead of site title benefits usability and accessibility (or doesn't, as the case may or may not be). Answers based on fact instead of just personal supposition will get many bonus points!