[thelist] p tags in lists

rudy r937 at interlog.com
Tue Sep 10 10:46:00 CDT 2002


>can anyone remember what the outcome was?

yes, since it's a valid construction, the outcome is to use <p> within <li>
if you want to, otherwise don't

;o)

>If you sometimes use <p> within a list because the list item is bigger
>than a single line and sometimes don't use it, how would you make sure
>that all lists were styled the same.

my understanding is that the <li> has its own margins, and <p> has its own
margins, and these are "combined" by taking the larger of the two -- much
like if you want a <p> to have no intervening space after a heading, you
have to change the bottom margin of the heading as well as the top margin
of the <p>

without having tested it, i would expect a list like this --

<ul>
 <li>some text</li>
 <li>some more text</li>
 <li><p>a paragraph</p></li>
 <li>more text</li>
 <li>yet more text</li>
</ul>

to show single spacing for the list items, with paragraph spacing for the
<p>

obviously, to have paragraph spacing for all list items, make them all
<p>s, and for single spacing, suppress the <p> margins or don't make it a
<p>

rudy
http://rudy.ca/




More information about the thelist mailing list