[prev in list] [next in list] [prev in thread] [next in thread] 

List:       whatwg
Subject:    Re: [whatwg] Question about allowed <ol> and <ul> descendants
From:       "Anne van Kesteren" <annevk () opera ! com>
Date:       2008-12-08 10:54:50
Message-ID: op.ulua9oef64w2qv () annevk-t60 ! oslo ! opera ! com
[Download RAW message or body]

On Mon, 08 Dec 2008 11:46:52 +0100, Aaron Leventhal <aaronlev@moonset.net>  
wrote:
> http://dev.w3.org/html5/spec/Overview.html#the-ol-element
>  > Categories:Flow content  
> <http://dev.w3.org/html5/spec/Overview.html#flow-content-0>
>  > Contexts in which this element may be used: Where flow content  
> <http://dev.w3.org/html5/spec/Overview.html#flow-content-0> is expected.
>  > Content model: Zero or more |li  
> <http://dev.w3.org/html5/spec/Overview.html#the-li-element>| elements.
>
> Is there a conflict between these things? It seems that the <ul> and  
> <ol> elements allow flow content.

No they don't. They are "flow content" and can be put where "flow content"  
can be put, but they can only contain <li> elements for the moment.


> On the one hand, that seems to allow many kinds of descendants, such as  
> child lists. However, the content model says that only <li> children are  
> expected.
>
> 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. ;-)


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic