Re: What is the scope of a header?

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:43 UTC