W3C home > Mailing lists > Public > public-html-comments@w3.org > May 2008

Re: Allow UL/OL as direct children of UL/OL?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sun, 25 May 2008 21:26:56 +0200
Message-ID: <4839BD80.20706@lachy.id.au>
To: Rocky Kahn <rocky@teampatent.com>
Cc: public-html-comments@w3.org

Rocky Kahn wrote:
> The HTML 5 draft and preceding w3c
> standards<http://www.w3.org/html/wg/html5/#the-ol>seem to specify that
> <ul>/<ol> can not be direct child of <ul>/<ol>.
> Specifically, the content model of <ol> and <ul> is "Zero or more
> li<http://www.w3.org/html/wg/html5/#li>elements."  This poses a
> problem for designing a rich text editor (which
> we're doing).  Typically, when users add a list item onto an already created
> list, it is encoded as a separate list rather than joining it with previous
> list items.  Consider a case where a user of a rich text editor such as
> Google Mail or Google Documents starts with "apple" & "banana" at level 1
> and "pear" at level 2 as shown below:
>   * apple
>     * pear
>   * banana
> When the user indents "banana", it's coded as a separate <UL> as shown
> below.
>> <ul>
>>   <li>apple</li>
>>   <ul>
>>     <li>pear</li>
>>    </ul>
>>   <ul>
>>     <li>banana</li>
>>   </ul>
>> </ul>

This is a problem with the editor, not with HTML.  To do nested lists, 
the sub-lists need to be put within an <li> element of the parent list.


Lachlan Hunt - Opera Software
Received on Sunday, 25 May 2008 19:27:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:24 UTC