E-mail List Archives

Re: Heading order/nesting - was RE: H1 header in iframe


From: Jukka K. Korpela
Date: Aug 26, 2010 10:42AM

Jared Smith wrote:

> Well, the H1 is a first level, main document heading. The HTML spec
> indicates that a heading "describes the topic of the section it
> introduces" (http://www.w3.org/TR/html401/struct/global.html#h-7.5.5).
> As such, making the site name the <h1> is perfectly valid.

You just contradicted yourself, provided that "perfectly valid" means
"perfectly correct", as I presume. ("Valid" is really a technical term in
HTML context and should not be used as general appraisal.) The _site_ name
does not describe the topic of the _document_ (and normally the entire
document is the section corresponding to <h1>), except possibly on the
_main_ page.

> With the exception of the home page, few
> documents are really about or best described by "site name".

Well, I knew you would ultimately agree. :-)

People say that multiple <h1> elements cause trouble in "search engine
optimization". There might be some truth in this, since if you are a poor
lonesome search engine, how could you decide which of the two <h1> elements
is really the document's heading (which should normally be very important in
searches)? This in turn affects accessibility because search engines are
more and more becoming everyone's user interface to the web. It's easier to
type "foobar" in a Google search box and find a foobar page and also "the"
foobar page (assuming "foobar" is a real proper name, e.g. of a product or a
person or a company or a city) than to scan through your bookmarks or try to
guess whether to try foobar.org or foobar.com or foobar.tv. If you disturb
search engines, you disturb people who try to find your page and have e.g.
forgotten its URL.

(I'm not saying that multiple <h1> elements is a big issue here. My point is
that using <h1> for site name most probably wins nothing and probably loses

>> And since I was taught there can't be an H2 without an H1
> I hear this being taught, but don't see any strong reason why it must
> be this way. The spec certainly does not require it. Maybe I'm missing
> something.

The HTML standard requires it, but I don't think many people take the
standard seriously or even know about, or would have a reason to. People
have read so much about W3C recommendations as "standards" that they would
hardly recognize a real standard...

But it's always been good practice not to skip heading levels, and starting
with <h2> surely skips the first level. Skipping heading levels is typically
a symptom of using heading markup just to create large font sizes, something
that was common in early 1990 before style sheets or even <font> tags became
available. In fact, <h1>W3C</h1> across all pages of the site almost looks
like a parody of that, but I'm afraid it isn't.

Yucca, http://www.cs.tut.fi/~jkorpela/