Re: h and section/div

Jewett, Jim J wrote:

> I understand (and agree with) the decision to replace H1 through H6.
> 
> <section class="legal"> is certainly better than overloading <h6>.
> 
> But I don't think the current definition of <h> fully solves the
> semantics<->markup mapping problem.  I suggest changing the models of
> section, div, and block* to include at most one optional title as the first
> element.

A good idea, but one which I feel should be addressed by the use of the 
<caption> element instead of the <title> or <h> element.

> Semantically, section would be something you might expect to see in a table
> of contents, like a chapter.  div or block* would be more like an example;
> an example within a chapter is not more important than an example within a
> subchapter.
> 
> <section>
> <h>Title of the first section.</h>
> 	asdlfjasldfjk asdlfjkasldfjk
> 	<div><h>minor heading</h></div>
> 	<section>
> 	This section has no heading.
> 		<section>
> 		<h>level 3 heading.</h>
> 			<div><h>equally minor heading.</h></div>
> 		</section>
> 	</section>
> <section>

Formatting <h>'s that are not children of <section>'s is at all 
difficult in CSS.  The CSS selector :not(section)>h would do nicely.  
If you are arguing that it should not be treated semantically the same, 
well that 's one reason I favor using <caption> instead of <h> for this 
purpose.

> Additional problems with the current definition,  based on the draft
> example:
> 
> <body>
> 	<h>This is a top level heading</h> 
> 	Oh, h floats up and heads the whole document.
> 	Also, things can be outside of any section.
> 
> <p>
> ....If I put <h>h directly inside a paragraph</h> that would be wrong.
> Instead, I have to write
> 	<blockquote>
> 		<div>
> 			<h>This is still attached to the top of the
> document, right?</h>
> 			There was no section yet, so it should float up to
> body or html.
> 			The heading is OK now <em>because</em> I'm inside a
> div,
> 			which can appear inside a blockquote which can
> appear inside a
> 			paragraph.
> 		</div>
> 	</blockquote>
> </p>
> <section>
>     <p>....</p>
>     <h>This is a second-level heading</h>  
> 	It applies to the whole section, including the paragraph that
> already finished.
> 	Well, unless there is an implicit div created by the h and ended by
> the next h?
>     <p>....</p>
>     <h>This is another second-level heading</h>  
> 	It applies to the same section though, so it must be retitled?  Or
> maybe h really
> 	maps to the next section beneath it?
>     <p>....</p>
> </section>
> <section>
>     <p>....</p>
>     <h>This is another second-level heading</h>
>     <p>....</p>
>     <section>
>         <h>This is a third-level heading</h>
>         <p>....</p>
>     </section>
> </section>


Actually no, your <h> wouldn't get moved up, altho they would still 
have their heading level associated with the number of sections that 
they are embedded in.  Given the way h is being used, might it not be 
worthwhile to allow <h> to only be a child of <body> and <section>.  
The way that <section> and <h> are linked semantically certainly makes 
me think that it might be a good idea. Semantically <section><div><h> 
makes as much sense as <object><div><param> but while the first one is 
currently valid, the second is not and I have come to the conclusion 
that neither should be.

Received on Thursday, 29 May 2003 19:06:38 UTC