W3C home > Mailing lists > Public > www-html@w3.org > July 2001

RE: List elements (was: Tree Presented Lists )

From: <JeanMichel.Leclercq@electrabel.com>
Date: Tue, 24 Jul 2001 09:20:47 +0200
Message-ID: <8D1414482878D4119AEE00508B6C907404A26379@SEACEX02>
To: www-html@w3.org
Hi all,

>-----Original Message-----
>From: Tantek Celik [ mailto:tantek@cs.stanford.edu
<mailto:tantek@cs.stanford.edu> ]
>Sent: vendredi, 20. juillet 2001 19:40
>To: Daniel Hiester
>Cc: www-html
>Subject: Re: List elements (was: Tree Presented Lists )
>
>
>Daniel Hiester, at 22:19 on Thu, 19 Jul 2001, wrote:
>
>>     Why is it that we don't simply have an element that means 'list.'
>>     Why was it so important to have the markup parser distinguish the
>>     difference between an ordered and unordered list?
>
>Semantically they are different as others have pointed out,
>but I wonder,
>instead of <ol>, <ul>, <dl> tags, why wasn't there simply one
><list> tag
>with a type attribute, e.g.
>
> <ol> = <list type='ordered'>
> <ul> = <list type='unordered'>
> <dl> = <list type='definition'>
> <dir> = <list type='directory'>
> <menu> = <list type='menu'>
>

Why not. This syntax suggests also the following one to me.

<list type="tree">
  <li level="1">item 1</li>
  <li level="2">item 1.1</li>
  <li level="2">item 1.2</li>
  <li level="1">item 2</li>
</list>

The "level" attribute offer the way for nesting list items. But this can
also be achieved with the following syntax too:

<ol>
  <li level="1">item 1</li>
  <li level="2">item 1.1</li>
  <li level="2">item 1.2</li>
  <li level="1">item 2</li>
</ol>

My conclusion is that defining a tree-based list is nothing more than
associating a "nesting level" to each element.

However, I see a problem here when giving the "level" attribute's value. You
could give to each item any value which could break the nesting effect. This
is why an alternative could be to indent/outdent items. Example:

<ol>
  <li>1</li>
  <indent>
    <li>1.1</li>
    <li>1.2</li>
    <indent>
      <li>1.2.1</li>
    </indent>
    <li>1.3</li>
  </indent>
  <li>2</li>
</ol>

I see many advantages:

*	Because unknown tags are ignored by browsers, the "indent" tag used
here won't be rendered.
*	It can fit in the existing lists tags like ol, ul, ...
*	Indentation of tags (HTML code view) shows directly the structure of
the tree to the designers.
*	Each indent tag can be associated to a style via a "class"
attribute, allowing different visual effects by level of indentation.
*	It should be easy to display the tree with the desired graphical
effects.
*	And more. I think, it could be parsed by non-visual browsers too !

This is just a point of view. What do you think about that ?

Jean-Michel. 
Received on Tuesday, 24 July 2001 03:22:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:49 GMT