The <h> and <section> elements

Hi,
  I think a *recommendation* (not a rule) should be stated that::
  "Each <section> SHOULD* only have one associated <h> element 
(exculding those in nested sections), and this <h> element should appear 
before any other <section> content (incl. paragraphs, lists, nested 
sections, etc...)."
    * Use of the word should as defined in [RFC2119]

  Making this a *rule* within the DTD/Schema would be difficult (if not 
impossible) without causing additional problems.

1. From Current Example in XHTML Block Text Module[1]:
<body>
<h>Events</h>
<section>
    <h>Introduction</h>
    <p>....</p>
    <h>Specifying events</h> <!-- second h element within section here -->
    <p>...</p>
    <!-- etc... -->
</section>
</body>

2.  Modified Example:
<body>
<h>Events</h>
<section>
    <h>Introduction</h>
    <p>....</p>
</section> <!-- Split into two sections here -->
<section>
    <h>Specifying events</h>
    <p>...</p>
    <!-- etc... -->
</section>
</body>

Pros:
    1. Unambiguously associates each heading with it's content.
    2. Helps to provide a structured document outline.
    3. Helps improve accessability (because of reasons 1 and 2).
    4. Not much more difficult to write.

Cons:
    (Can't think of any, please reply if you can.)

(Maybe this should be a recommendation in an Accessability (WAI) 
document, rather than the XHTML 2.0 specification?)

  On a seperate note, <h1> - <h6> should be removed, rather than just 
deprecated.  <section> and <h> provides enough structure, without the 
limitation of only 6 heading levels.  Backwards compatibility should not 
be a problem because:
  1.  CSS provides styling information to browsers that don't have a 
default style for the <h> element.
  2.  XHTML2.0 uses a different mime type, which is not even compatible 
with some existing UAs, as discussed in a previous thread.  Thus, 
backwards compatibility should not even be an issue.

[1] 
http://www.w3.org/TR/2003/WD-xhtml2-20030506/mod-block-text.html#sec_8.9.

Received on Tuesday, 4 November 2003 08:46:32 UTC