Re: Netsted lists in W3C's Validation Service (http://validator.w3.org/)

by "apathetic" <tmbkr(at)apatheticgenius.com>

 Date:  Sat, 22 Dec 2001 13:53:20 -0000
 To:  "Yuri Demchenko" <demch(at)terena.nl>,
<hwg-techniques(at)hwg.org>
 References:  terena
  todo: View Thread, Original
Nested lists should be used in the following format:

<ul>
    <li> . . . </li>
    <li> . . .
        <ul>
            <li> . . . </li>
            <li> . . . </li>
        </ul>
    </li>
    <li> . . . </li>
</ul>


In fact, the example on the W3C page DOES follow this format.  Copy & paste
from that page:

<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>

Notice that none of the <li> elements have closing tags.  The reason that
this is valid is that the ending tags are implied in the correct places.
The following is how the HTML would look if the end tags were included:

<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>

The reason the "deprecated example" was labelled such is that the omission
of closing tags is no longer considered valid and is only allowed for
backwards compatibility.

Tim


www.ApatheticGenius.com
----- Original Message -----
From: "Yuri Demchenko" <demch(at)terena.nl>
To: <hwg-techniques(at)hwg.org>
Cc: "Yuri Demchenko" <demch(at)terena.nl>
Sent: Saturday, December 22, 2001 11:04 AM
Subject: Netsted lists in W3C's Validation Service
(http://validator.w3.org/)


> Hi,
>
> When trying to validate my pages, I found one problem in W3C's
> Validation Service (http://validator.w3.org/) in validating/rendering
> nested lists for the HTML 4.01 Transitional DTD.
>
> I think it's not justified or even _violation_ of HTML 4.01
> specification to require so strict format for nested links like:
>
> <ul>
>     <li>Interim meeeting</li>
>     <li><b>Next TF-CSIRT meeting.</b>
>         <ul>
>             <li>Draft Agenda <i>(to be posted later)</i></li>
>             <li> Accompanying events </li>
>         </ul>
>     </li>
> </ul>
>
>
> instead of more obvious version that is specified by HTML 4.01 (see
> DEPRECATED EXAMPLE in 10.2 at
> http://www.w3.org/TR/html401/struct/lists.html):
>
> <ul>
>     <li>Interim meeeting</li>
>     <li><b>Next TF-CSIRT meeting.</b></li>
>         <ul>
>             <li>Draft Agenda <i>(to be posted later)</i></li>
>             <li> Accompanying events </li>
>         </ul>
> </ul>
>
> I have not found any HTML editors and converters that implement this
> format for nested lists. However, there are some sites that do this
> style of formatting for nested lists.
>
> I'll appreciate your comments.
>
> Regards,
>
> Yuri Demchenko

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA