[whatwg] Section nesting menu and an old HTML 3 friend LH

"Tim Connor" <timocratic at gmail.com> wrote:

>As I see, there is no way to do this (my more complex variation on
>your example), properly, correct?  I intentionally threw in a
>mish-mash of ways of doing it, so there is more to work with -
>flattened, as you did, lh's and hn's.  We are just supposed to flatten
>all lists?
>
><h1>Car and Bicycle Brands</h1>
><ul>
>  <lh>Car</lh>
>  <li>Nissan</li>
>  <li>Jaguar</li>
></ul>
><h2>Bicycle</h2>
><ul>
>  <li><h3>Road Bikes</h3></li>
>  <li>
>    <ul>
>      <li>Raleigh</li>
>      <li>Scott</li>
>    </ul>
>  </li>
>  <li>
>    <ul>
>      <lh>Mountain Bikes</lh>
>      <li>Specialized</li>
>    </ul>
>  </li>
></ul>

There are errors in your example code. Leaving the issue of suitability
of having list headers appear in the document outline aside for the sake
of discussing sectioning nested lists, the way to do what you want would
be the following:

<h1>Car and Bicycle Brands</h1>
<ul>Car
   <li>Nissan</li>
   <li>Jaguar</li>
</ul>
<h2>Bicycle</h2>
<ul>
   <li><h3>Road Bikes</h3>
      <ul>
         <li>Raleigh</li>
         <li>Scott</li>
      </ul></li>
   <li><h3>Mountain Bikes</h3>
      <ul>
         <li>Specialized</li>
      </ul></li>
</ul>

-- 
Spartanicus

Received on Tuesday, 3 April 2007 13:26:16 UTC