Forum Moderators: open

Message Too Old, No Replies

Headers - correct usage?

W3C documents use multiple H1s

         

Hester

8:43 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am confused over the correct way to use headers. I looked at various pages on the W3C and noticed they used multiple <h1>s. I thought only one was possible on a page? Take a look at the XHTML 2.0 draft spec:

[w3.org...]

So I checked the HTML 4.01 spec but it doesn't say what's right and wrong:

[w3.org...]

Also, must the site's name be used for the H1? I'm sure I've seen a page recently where a large header logo wasn't given an H1, but the actual page title underneath was. This struck me as more sensible, as the site name will always appear in the browser's top window bar. Plus it saves messing around with techniques that hide the H1 text when a header graphic is used.

tedster

9:51 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Speaking semantically, H1 is a main heading for a single document - nothing is higher in the hierarchy of information. As such, except in the case of very long pages perhaps (and then you've got a dual topic which is probably better split to multiple pages) there would not be more than one main heading.

Speaking techinically, there is no restriction. And so we see all kinds of implementation. Doesn't mean that it's useful (which is probably more important that what is "right").

It makes no sense to me to use H1 for the company name, whether graphic or text, unless it's a one page website. And even then, it's just maybe.

Hester

9:05 am on Aug 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So the W3C are doing it wrong?

Also, how does this affect search engines? Will multiple headers affect your ranking?

webdude

3:27 pm on Aug 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, how does this affect search engines? Will multiple headers affect your ranking?

Don't know about others, but I used to abuse this quite a bit in the past. On one page, I had a bunch of H1 headers at the top of each paragraph. The page tanked over a year ago. I ended up using just one H1 header and changed the others to H3. After a couple of months, the page popped back to its original postition in the SERPs. Coincidence? Maybe. But I have had no problems since. In fact, I went through a lot of other pages and will not put more then one H1 on any of them. Works for me.

chrisjoha

3:58 pm on Aug 18, 2005 (gmt 0)

10+ Year Member



I always restrain myself to use only one h1 per page. Then I use the other headers as an indication of what level they appear in. I only use headers to mark up actual headers in a document, never to embellish menu-headings and such. I only use h3 if theres a need to have a subsection inside a subcsection (ie h2 <text> h3 <text related to both h2 and h3>).

Some pages are more of a technical quality in which cases I often do not use h1 at all. For logos and site branding I use other tags, usually img with an appropriate id. I think this approach has very meaningful semantics to it.

encyclo

5:07 pm on Aug 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So the W3C are doing it wrong?

No, the spec allows this - a

<h1>
is merely the most important heading level on a page - but with the huge diversity of pages out there, it would have been wrong to restrict the number of times the most important heading can be used. In the linked document, there are four headings which the author considers to be of equal importance, and those headings are the most important parts of the page.