[whatwg] Question about allowed <ol> and <ul> descendants

Ian Hickson ian at hixie.ch
Mon Dec 8 15:23:52 PST 2008


On Mon, 8 Dec 2008, Anne van Kesteren wrote:
>
> > What about nested lists, like this?
> > <ol>
> > <li>Apples</li>
> > <li>Oranges
> > <ol>
> > <li>Seeded</li>
> > <li>Navel</li>
> > </ol>
> > </li>
> > </ol>
> > 
> > I would think that's allowed. So, what kinds of content are allowed 
> > inside of <ol> and <ul>?
> 
> If you want to nest lists the <ol> or <ul> should go inside a <li>, ever 
> since lists have been invented. ;-)

What Anne said. If you think about it, a list inside a list is just an 
item in that list. I don't know what it would mean to nest lists without 
them actually being part of an item of the parent list.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list