RE: creating a menu

Randal Rust wrote ...

> I am currently using UL and LI to create menus.
> 
> <ul>
> 	<li class="navHeader">Cheeses</li>
> 	<li>Limburger</li>
> 	<li>Swiss</li>
> </ul>

To me this looks like a list with two levels: the "types of food" (in this
case "Cheeses") and the sub-types (e.g. Limburger etc.) This should be clear
from the mark-up, without any additional hints provided by class attributes.
This attribute is useful for a human reader, but doesn't convey any specific
semantics for a machine, whereas a two level list has such semantic
information built in. (This is the same argument as using <th> for a table
heading, rather than <td class="tableheading">).

So it could be coded:

<ul>
 <li>Cheeses
  <ul>
   <li>Limburger</li>
   <li>Swiss</li>
  </ul>
 </li>
</ul>

and extending to other food types:

<ul>
 <li>Cheeses
  <ul>
   <li>Limburger</li>
   <li>Swiss</li>
  </ul>
 </li>
 <li>Breads
   <ul>
   <li>Bloomer</li>
   <li>Cob</li>
  </ul>
 </li>
 <li>Spreads
   <ul>
   <li>Pickle</li>
   <li>Marmite</li>
  </ul>
 </li>
</ul>

etc - i.e. "Cheeses", "Breads", "Spreads" are in one list, and the specific
items are in sub-lists asscoiated with their particular heading.

	Tom

Dr Tom James
Senior Consultant

===============================================================
Digitext - Online Information at Work

Telephone: +44 (0)1844 214690
Fax: +44 (0)1844 213434
Email: tom.james@digitext.com
Web: http://www.digitext.com/

Received on Tuesday, 16 July 2002 11:37:51 UTC