Ross Gardler said the following on 21/06/2005 15:29:

Boynak, Dana Rose wrote:

Hi, I am trying to use an unordered list in <p> tags but it won't allow
me to.  The following is the error I am receiving.  Is there a way I
could still do an unordered list in a paragraph? The content of element type "p" must match
"(strong|em|code|sub|sup|br|img|icon|acronym|a)".


Instead of:

<p>
  blah blah
  <ul>
    <li>list item</li>
    <li>list item</li>
  </ul>
  blah blah
</p>

Just do:

<p>
  blah blah
</p>
<ul>
  <li>list item</li>
  <li>list item</li>
</ul>
<p>
  blah blah
</p>

(note a paragraph is a group of sentences, so list, ordered or otherwise has no place inside a paragraph)

Ross

Not everyone would agree that lists (and long quotations) never have their place in paragraphs. The essence of a paragraph is that it treats or develops a single point. It may be a short phrase, or even just a word in a dialogue, or quite long. Discussion of a list's content may well belong in the same paragraph as its introduction.

"The object of treating each topic in a paragraph is, of course, to aid the reader. The beginning of each paragraph is a signal to him that a new step in the development of the subject has been reached." (Strunk and White, "The Elements of Style").


The work-around of placing the list between two paragraphs may be satisfactory, at least when the list begins or ends the paragraph. However, if the paragraphs are indented, the reader may not easily recognize that the end of the discussion is the continuation of the same point. As Strunk and White caution,

"But remember, too, that firing off too many paragraphs in quick succession can be distracting. Paragraph breaks used only for show read like the writing of commerce or of display advertising. Moderation and a sense of order should be the main consideration in paragraphing."


In the DocBook model, "ordinary para can contain most types of block elements", and Norman Walsh and Leonard Muellner use an itemized list to illustrate this. (http://www.docbook.org/tdg/simple/en/html/para.html). It is simpara, simple paragraphs, which cannot contain block elements.

Maurice