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>

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

  <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>

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:


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
*	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 ?

Received on Tuesday, 24 July 2001 03:22:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:57 UTC