[whatwg] <h1> to <h6> in <body>

dolphinling wrote:

>
>>      <li><h3>H</h3></li>     2.4.   H
>>     </ol>                    (part of section started by H)
>>     <p>...</p>               (part of section started by H)
>
>
>>     <h2>J</h2>               3.     J
>>     <div>                    (part of section started by J)
>>      <p>...</p>              (part of section started by J)
>>      <h2>K</h2>              4.     K
>>      <p>...</p>              (part of section started by K)
>>     </div>                   (part of section started by K)
>>     <p>...</p>               (part of section started by K)
>
>
>>
>> Any objections? Any other edge cases that I have forgotten?
>
>
> This makes it impossible to later specify a <section> element.
>
Why? <section> will obviously have special behavior wrt headings and 
where they apply.
In general, if headings only apply to siblings of the heading element 
and their descendants, it makes constructs like:
<div><h2>...</h2></div>
<p>...</p>
different from
<h2>...</h2>
<p>...</p>
Which, at the very least, seems odd if <div> is supposedly non-semantic.

On another point, in general, I don't like adding anonymous headings so 
that e.g.
<h2>A</h2>
<h4>B</h4>
becomes:
1 A
|--1.0 Untitled
   |--1.0.1 B
although, theoretically, this allows added flexibility when dealing with 
highly structed documents (the type where numbering sections is 
appropriate), in practice, the majority of documents on the web aren't 
like this and often authors use structures like:
<h1>My Page</h1>
<h2>Main Content</h2>
<h3>Conetnt Scetion</h3>
<h2>My Sidebar</h2>
<h4>Sidebar section</h4>
<h4>Sidebar section 2</h4>

Which should outline like
My Page
|--Main Content
   |--Content Section
|--My Sidebar
   |--Sidebar section
   |--Sidebar section 2

i.e. without anonymous intermediaries

-- 
"But if science you say still sounds too deep,
Just do what Beaker does, just shrug and 'Meep!'"

-- Dr. Bunsen Honeydew & Beaker of Muppet Labs

Received on Thursday, 31 March 2005 01:50:48 UTC