E-mail List Archives

Re: page should contain no more than two h1 elements

for

From: Jared Smith
Date: Jun 16, 2009 8:35AM


On Tue, Jun 16, 2009 at 4:44 AM, M Akram Danish wrote:
>
> Why I should need to repeat <title> in <h1>, every page has
> it own title that explain what one should expect in the page.

There certainly is no rule that the h1 be the same or part of the page
title. However, both the title and the h1 should typically inform the
user of what the page is, so it's possible and likely that there will
naturally be some redundancy. Don't worry about this. Forcing h1 and
title to be different to avoid redundancy is a bad idea.

> i checked w3.org site and they use image in <h1>
> <h1 id="logo"><img alt="The World Wide Web Consortium
> (W3C)" height="48" width="315" src="/Icons/w3c_main" /></h1>
>  it seems it is just to fulfill the requirement that there should not
> be more than 2 <h1>. and as far as I know we cannot use <h2>
> before having <h1>.

If you check any page other than the home page, you'll see that the
W3C site does have h2's before the h1. There's no rule that you can't
do this, though there are some that believe this to be wrong due to a
very strict interpretation of the rule that you can't skip heading
levels. I, and I think most people, disagree with this interpretation.
See http://h1debate.com/ for loads of comments and votes on this
issue.

Interestingly, the new W3C web site has two h1's on each content page
(http://beta.w3.org/standards/webdesign/accessibility, for example). I
would not interpret this to be "the way" to do things. Between the two
W3C sites, they do all three of the possible implementations we've
discussed in this thread. Perhaps it's their unique way of not
providing an answer or best practice?

By the way, it doesn't really matter that much what you do hear.
Neither approach results in inaccessibility. But I think it should be
relatively clear from the posts here that there might be a slightly
more optimal approach to facilitate page navigation.

> besides using image in <h1> is new to me I thought we use only text in heading.

An image with appropriate alt text *is* text. This is perfectly acceptable.

Jared