W3C home > Mailing lists > Public > www-html@w3.org > February 2006

Re: What is the scope of a header?

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Fri, 03 Feb 2006 10:10:32 +0100
Message-ID: <43E31E08.7030104@students.cs.uu.nl>
To: Jim Jewett <jimjjewett@gmail.com>
Cc: www-html-editor@w3.org, www-html@w3.org

Jim Jewett schreef:
> I assume the implicit div would end at the first of (1)  the end of
> the container or (2) the next header of at least equal strength (and
> separators are too weak to end it), but ... maybe it would be better
> to just require the sectioning explicitly.

I tried to style numbers for headings using CSS (in Prince), itís not 
easy, and the <h>s possible use directly inside the body without a 
nesting <section> element only makes it harder, because itís 
inconsistent with the other headings.

The lack of clarity whether first-level headings should be a child of 
the body or a child of a section element in the body also makes it 
difficult to do such styling.

Also, although it may seem that requiring a <section> around a <h> adds 
additional unnecessary markup, if you look at websites in practice you 
will notice that such a containing element is usually already there 
anyway (e.g. <div class="content">), so why not make it structural and 
have it be a section.

So I second the suggestion to require the sectioning explicitly, or 
rather: making a formal statement that wrapping a top-level <h> and its 
paragraphs in a <section> is desirable.

Or, alternatively, stating that the body should only contain one 
top-level section (and <h>), but I think this imposes an unnecessary 
limit on the amount of top-level sections. Possibly multiple <body> 
elements could be allowed, but I do not think this is a good idea.

Also, I think it should be explicitly stated that there should be only 
one section heading inside a section, more specifically: that each 
section has its own <section>. This is currently unclear. The example at 
the <section> element does both, actually, it would be better to 
recommend either the one or the other (although not disallowing it). 
This is also the root cause of the aforementioned styling and structural 
difficulties.

Finally, as the subject says, more explicitly state the scope of a 
section: is it the same as its parent <section> element, or is it from 
the first <h> heading to either the next heading or the end of the 
<section> element. I prefer the former.

So, in summary: recommend to have each section wrapped in a <section> 
element, including the top-level section, and also state that it is not 
recommended to have one <section> element span multiple same-level sections.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
Received on Friday, 3 February 2006 09:10:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:05 GMT