W3C home > Mailing lists > Public > www-html@w3.org > June 2005

Re: [XHTML2] How are UAs to interpret <h> and <hx> elements?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 13 Jun 2005 12:26:49 +1000
Message-ID: <42ACEEE9.3020808@lachy.id.au>
To: Laurens Holst <lholst@students.cs.uu.nl>
CC: www-html@w3.org

Laurens Holst wrote:
> 
> Lachlan Hunt wrote:
>> 4. Define the top level heading to be body>h, if present, or 
>> body>section>h otherwise.
> 
> That would at least be difficult to express in CSS, which is an 
> important technology with which XHTML 2 has to be used, and which can 
> not be adapted to express this either.

For the general case, it wouldn't be too difficult.

body>section>h, body>h { /* level 1 */ }
body>section>section>h, body>h~section>h { /* level 2 */ }
body>section>section>section>h, body>h~section>section>h {/* level 3 */}

Though, that does have a problem when the top level heading follows a 
section like this:

<body>
   <!-- These two are rendered as level 1 and level 2, respectively,
        because they precede body>h -->
   <section>
     <h>Level 2</h>
     <section>
       <h>Level 3</h>
     </section>
   </section>

   <!-- The following are all rendered as intended -->
   <h>Level 1</h>
   <section>
     <h>Level 2</h>
     <section>
       <h>Level 3</h>
     </section>
   </section>
</body>

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Monday, 13 June 2005 02:27:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:19:03 UTC