[thelist] Guru help needed, LI and P

Mark Gallagher mark at cyberfuddle.com
Fri Jun 14 19:52:00 CDT 2002


Techwatcher wrote:

<snip />

> I had previously assumed I could put lists inside paragraphs, and
> paragraphs inside lists. Now I know better. I can't put lists inside
> paragraphs.
>
> But can I still put paragraphs inside the LI (list item)? I have been
> doing this a lot. I also don't know yet what I might do if P within LI
> turns out to be invalid, according to the spec!
>
> The LI forces a line-feed, thus it might be a block-level element. But
> I can't find anything in this element's definition that says it can or
> cannot contain another block-level element (whereas the definition of P
> explicitly forbids this).

LI can contain other block-level elements.  P cannot.

> I wish the spec would be explicit in all cases about what I can and
> cannot include within an element, or what can include an element.
> Grumble, grumble, grumble....

It is, sort of.  It's just rather difficult to decipher :o).


--
Mark Gallagher
http://cybefuddle.com/infinitebabble/






More information about the thelist mailing list