W3C home > Mailing lists > Public > www-validator@w3.org > February 2002

Re: Validating Nested lists in 4.01 Transitional

From: Liam Quinn <liam@htmlhelp.com>
Date: Wed, 20 Feb 2002 22:10:04 -0500 (EST)
To: Donald Firesmith <donald_firesmith@hotmail.com>
cc: <www-validator@w3.org>
Message-ID: <Pine.LNX.4.33L2.0202202204560.8425-100000@localhost.localdomain>
On Thu, 14 Feb 2002, Donald Firesmith wrote:

> I cannot get nested unordered lists to validate, yet the HTML 4.01
> Transitional specification says that they should, and the XHTML 1.0
> Strict does not deprecate nested lists.  The following code does not
> validate and the W3C HTML Validation service complains about the second
> <ul> as not being allowed there and assuming I meant <li>:
>
>     <ul>
>       <li> Produce a formally documented consensus amoung all project
> stakeholdlers (e.g., client,
>            users, project champions, project management, developers)
> concerning either the:</li>
>       <ul>
>         <li> Vision of the next version [incremental iteration] of the
> application.</li>
>         <li> Requirements for the application.</li>
>         <li> Scope of the application.</li>
>         <li> Boundaries of the application.</li>
>       </ul>
>       <li> Provide input (e.g., number of use cases and use case paths)
> to the endeavor&rsquo;s
> &nbsp! ! ! ! ;          cost and schedule estimation tasks.</li>
>
>    <ul>
>
> The FAQs do not help here.  What is right, the specifications or the
> validation program.

Both.  A UL element can only contain LI elements directly, not other UL
elements.  For nested lists, you need to enclose the inner UL within an
LI:

    <ul>
      <li> Produce a formally documented consensus amoung all project
stakeholdlers (e.g., client,
           users, project champions, project management, developers)
concerning either the:
        <ul>
          <li> Vision of the next version [incremental iteration] of the
application.</li>
          <li> Requirements for the application.</li>
          <li> Scope of the application.</li>
          <li> Boundaries of the application.</li>
        </ul>
      </li>
      <li> Provide input (e.g., number of use cases and use case paths)
to the endeavor&rsquo;s
&nbsp! ! ! ! ;          cost and schedule estimation tasks.</li>
    </ul>

-- 
Liam Quinn
Received on Wednesday, 20 February 2002 22:17:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:26 UTC