Re: Validating Nested lists in 4.01 Transitional

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