Re: HTML heading hierarchy for XHTML

Umm, since when can a first order *heading* include a second order *heading*
(the h1 element includes only the heading, not the other elements the
heading describes)?  According to XHTML 1.0 pr. rec. + HTML 4.01 rec, it
should be

<h1>First Order Heading</h1>
<p></p>
<h2>Second Order Heading</h2>
<p></p>

There's no point using XHTML if you're going to change the meaning of the
elements that drastically.  If you want to make the markup more
hierarchical, I'd do XML like this:

<sec1 n="1"><h1>First Order Heading</h1>
<p></p>
<sec2 n="1.1"><h2>Second Order Heading</h2>
<p></p>
</sec2>
</sec1>

or XHTML like this:

<div name="sec1"><h1>First Order Heading</h1>
<p></p>
<div name="sec1.1"><h2>Second Order Heading</h2>
<p></p>
</div>
</div>

(I believe that a div element can contain another div element.)

PT Rourke


----- Original Message -----
From: "Marc Rubin, Jay's Island Software Development & Consulting"
<html-tidy@mail.com>
To: <html-tidy@w3c.org>
Sent: Monday, January 31, 2000 3:59 PM
Subject: HTML heading hierarchy for XHTML [RE-POST]


> I'd like to preserve the implicit hierarchy of HTML headings when
converting to XHTML. For example, I'd like to end up with this XHTML output:
>
> <h1>Heading 1 text
>         <h2>Heading 2 under heading 1</h2>
> </h1>
>
> given this HTML input:
>
> <h1>Heading 1 text</h1>
>         <h2>Heading 2 under heading 1</h2>
>
> Would this translation be feasible as an option in Tidy?
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com?sr=mc.mk.mcm.tag001
>

Received on Monday, 31 January 2000 16:27:18 UTC