Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

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 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.