W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2007

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

From: Spartanicus <mk98762@gmail.com>
Date: Tue, 03 Apr 2007 21:26:16 +0100
Message-ID: <n2m-g.fld51399varf154m45vhk3cee45i5bt3q0@4ax.com>
"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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:34 UTC