≡ Menu

Does Someone Know?

I keep running into this, and I don’t really have the time to do the research… Does anyone know if your supposed to put ul tags inside of p tags, or outside them? I know it’s somewhat silly to think about… I tend to put them inside the p tags because I consider the list to be part of the paragraph content… But then again, I could just be crazy.

Comments on this entry are closed.

  • Alex April 23, 2007, 4:40 pm

    Unordered list tags go outside of paragraph tags. Something to do with block levelness. Validator gives following message when you nest:

    "The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>")."