[whatwg] Re: <section> and headings

fantasai wrote:

>
> I would define things as follows:

Generally, this sounds good to me.

>  - The first header in a <section> is that section's top-level header
>  - Depth of section increases:
>      - when heading number increases
>      - when <section> nesting increases--but this increments from
>        the last top-level <section> header rather than the last header

Does this mean that markup like:
<h1>Level 1,1</h1>
<h2>Level 2,1</h2>
<h1>Level 1,2</h1>
<section>
<h1>Level 2,2</h1>
</section>

would give rise to the outline:

Level 1,1
+-Level 2,1
+-Level 2,2
Level 1,2

That seems counter-intuitive (the outline no longer has the headings in
document-order). I would prefer the outline become:
Level 1,1
+-Level 2,1
Level 1,1
+-Level 2,2

i.e. <section> always appends to the previous heading in it's parent
section with a depth equal to the first heading in it's parent section.
This may be what you are saying in the next point, but I want to clarify
it applies to <section> as well as <hn>

>  - Depth of section does not decrease with a header number that is higher
>    than the section's top-level header's number. (This means all
>    subsequent header number increments increment based on this header's
>    number instead of the top-level header's number.)


>  - Section header immediately following a section header of the same 
> level
>    is considered a subtitle.

I haven't seen this much used in practice (people typically use <h{n+1}>
for a subheading with heading <h{n}>) and, generally, I prefer the
existing mechanism (i.e. <header>) as it allows things like:
<h1>Main Heading</h1>
<div>
<h1>Subheading</h1>
</div>
i.e. it preserves the neutrality of non-sematic elements.

Received on Monday, 22 November 2004 02:31:46 UTC