Re: When to use <p></p>

lilley (
Tue, 19 Dec 1995 11:20:52 +0000 (GMT)

"This is rumour control. Here are the facts" (Aliens 3)

Michael Godsey made the following assertion:

> <P> is not a container object, so there is no </P>. You can throw it
> in, and most browsers won't mind. It's not a required element, though.
> <P> is just a paragraph seperator, not a container.
> Hope that helps!

On the contrary, such misinformation is damaging. Please check your
sources before posting answers. I refer you to RFC 1866.

For anyone that was confused:

1) p is a container. The start tag is <p> and the end tag is </p>

2) the end tag can be omitted (but is never wrong), because the DTD was
expressly designed that way. The parser can reliably infer the missing </p>

3) This example contains some text in a paragraph and some text not in
a paragraph. Once you start using stylesheets, these two may be rendered

Text not actually in a paragraph
Text in a paragraph

If you want them both to be in a paragraph, use:

Text now in a paragraph
Text in a paragraph

Chris Lilley, Technical Author and JISC representative to W3C 
|  Manchester and North Training & Education Centre   ( MAN T&EC )  |
| Computer Graphics Unit,             Email: |
| Manchester Computing Centre,        Voice: +44 161 275 6045       |
| Oxford Road, Manchester, UK.          Fax: +44 161 275 6040       |
| M13 9PL                            BioMOO: ChrisL                 |
| Timezone: UTC        URI: |