Re: Referencing orginal documents, When to use <p></p>

lilley ([email protected])
Tue, 19 Dec 1995 18:12:00 +0000 (GMT)


Chuck said:

> 2. <p>..</p> mixed with <ul>..</ul> etc
>
> One of the things that I get confused over is when to use </p>, if at
> all.

In general, miss it out. But remember that <p> goes at the *beginning*
of a paragraph.

> For example, I might be writing something and then make a couple
> of points:
>
> <p>
> blah blah, for example:
> <ul>
> <li>one
> <li>two
> </ul>
> and then blah blah.
> </p>
>
> Would that be correct,

not really, if you intend the </p> to match up with the earlier <p>
The list terminates the paragraph, rather than being encloded within it.
So what you have is

<p>
blah blah, for example:
</p> <====== inferred by parser on encountering <ul>
<ul>
<li>one
</li> <====== inferred by parser on encountering <li>
<li>two
</li> <====== inferred by parser on encountering <li>
</ul> <====== this one can't be omitted
and then blah blah. <=== not actually in a paragraph
</p> <====== INCORRECT, no open paragraph to close

Instead, what you probably meant was:

<p>blah blah, for example:
<ul>
<li>one
<li>two
</ul>
<p>and then blah blah.
>
> This is a simple example of course. Other examples are page lists,
> which might be:
>
> <h2> </h2>
> <ul>
> <li>
> </ul>
>
> Should a <p> .. </p> be there too?

No. You have a heading followed by a list, but no paragraphs.

-- 
Chris Lilley, Technical Author and JISC representative to W3C 
+-------------------------------------------------------------------+
|  Manchester and North Training & Education Centre   ( MAN T&EC )  |
+-------------------------------------------------------------------+
| Computer Graphics Unit,             Email: [email protected] |
| Manchester Computing Centre,        Voice: +44 161 275 6045       |
| Oxford Road, Manchester, UK.          Fax: +44 161 275 6040       |
| M13 9PL                            BioMOO: ChrisL                 |
| Timezone: UTC        URI: http://info.mcc.ac.uk/CGU/staff/lilley/ | 
+-------------------------------------------------------------------+