WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Header tag

for

From: Simon Jessey
Date: Apr 30, 2003 1:01PM


----- Original Message -----
From: "Alastair Campbell" < <EMAIL REMOVED> >
Subject: RE: Header tag


> I understand why heading tags should start with H1, followed by H2 then
> H3 for page title, section and subsection. What I don't understand is
> why you cannot start a new sub section, going from an subsection to a
> new section (e.g. H4 to H2).
>
> James' example was:
> h1 page title
> h2 chapter 1
> h3 section 1
> h3 section 2
> h2 chapter 2
> h3 section 1
> h4 sub-section 1
>
> Bobby would fail this for the H2 following an H3. Is there a reason for
> this, or is it a slight bug in the check?


There is no failure here, that I can see. There should never be a reason to
jump from a lower priority header to a higher priority header. In the
example given, chapters would normally be given unique documents, so the
hierarchy would be like this:-

<h1>Page Title</h1> (mimics the <title>...</title> element)
<h2>Chapter</h2>
<h3>Section 1</h3> (if required)
<h3>Section 2</h3>

If 'sub-sections' are required, then the documents should be further
sub-divided into sections, with each section having its own page instead.
This may seem like overkill, but it is the best method of maintaining a
proper, hierarchical structure.

Obviously there are exceptions to this. An example would be a W3C technical
recommendation. These are made available as a single, enormous HTML file for
those who prefer it, but such a file jumps up and down the header hierarchy
because the original, multi-page document (which did not do this) was
combined to make the large file.

Simon Jessey

w: http://jessey.net/blog/
e: <EMAIL REMOVED>


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/