Nested Listing Example

This is a comment on the HTML 4.0 spec.

The section on lists (OL / UL) has unclear or misleading examples.

<UL>
       <LI> ... Level one, number one...
       <OL>
          <LI> ... Level two, number one...
          <LI> ... Level two, number two...
          <OL start="10">
             <LI> ... Level three, number one...
          </OL>
          <LI> ... Level two, number three...
       </OL>
       <LI> ... Level one, number two...
  </UL>

The DTD clearly states that UL can only have LI elements, but in the
example it appears that the outermost UL, has OL elements in it, and
that the OL have OL tags inside them.  If I read the spec right, then
the OL tags must be *inside* the LI tags.  This is not clear because the
</LI> tags have been omitted from the picture.  I understand that while
the end tags are optional, tools that generate HTML are supposed to
include them.

Please confirm that the following example is correct:

<UL>
   <LI> ... Level one, number one...
      <OL>
         <LI> ... Level two, number one... </LI>
         <LI> ... Level two, number two...
            <OL start="10">
               <LI> ... Level three, number one... </LI>
            </OL> </LI>
         <LI> ... Level two, number three... </LI>
      </OL> </LI>
   <LI> ... Level one, number two... </LI>
</UL>

-Keith Swenson

Received on Wednesday, 16 July 1997 14:37:59 UTC