W3C home > Mailing lists > Public > www-html@w3.org > November 2002

Re: Subheadings desired in XHTML 2.0

From: Liorean <Liorean@user.bip.net>
Date: Sat, 09 Nov 2002 22:24:44 +0100
Message-Id: <5.1.0.14.0.20021109220300.00b38498@pop3.bip.net>
To: Etan Wexler <ewexler@stickdog.com>, www-html@w3.org

At 18:50 2002-11-06 -0500, Etan Wexler wrote:
>How does XHTML 2.0 deal with subheadings?  How should XHTML deal with 
>subheadings?

By nesting heading/section.

>Do subheadings need a distinct element type?  Should subheadings be 
>children of headings rather than siblings of headings?

They should be children of sections, and nephews(?) of headings.

>Given an article with the main heading "Foo" and with the subheading 
>"Bar", given the possibility of an element type 'sh' for subheadings, and 
>assuming that the examples are valid, which of the following document 
>fragments is most appropriate?  Why is that?

None, really. You need a section element to differentiate the heading level.

><!-- begin 1 -->
><h>Foo
>    <sh>Bar</sh></h>
>
><!-- begin 2 -->
><h>Foo
>    <h>Bar</h></h>
>
><!-- begin 3 -->
><h>Foo</h>
><sh>Bar</sh>
>
><!-- begin 4 -->
><h>Foo</h>
><h>Bar</h>

IMO, the correct way to do this should be the same as for multilevel 
headings, as follows:
   <section>
     <h>
       Main heading
     </h>
     <section>
       <h>
         Subheading
       </h>
       <p>
         Content
       </p>
     </section>
   </section>


The top section element can be left out, though, since other elements (eg 
body, div) provide their containing block.

The reason I think this is the way of including subheadings, is that I 
think a subheading is really just a lower-level separate heading. It's 
semantically equivalent of a nested heading directly following the 
higher-level heading.

// Liorean
Received on Saturday, 9 November 2002 16:24:58 GMT

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