Forum Moderators: open
[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.
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.
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.
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.
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.