[Local Convention]

 [CoOL Conventions] CoOL Conventions

The P element should always have both a start tag and an end tag:

<p>This is a paragraph</p>

Because of a quirk in the way that HTML is defined, you will often need to create "paragraphs" that aren't really paragraphs to human speakers. (see below)

The p element encloses a paragraph, or a paragraph-like block of text. Since nearly every bit of text (or image) in the body of your document must be enclosed in a "container" element, most of your document will normally be enclosed betweeen <p> and </p> tags.

The <p> tag is required at the beginning of the paragraph, but the endtag </p> is optional. Nevertheless, consistently including the endtag is a good practice, and make certain types of automated processing easier. More importantly, it helps to make explicit exactly where your paragraph really ends, which may differ quite significantly from where you as an author would have it. The ambiguity arises from the fact that HTML prescribes quite rigidly which elements may nest inside other elements. The only things that may occur in the <p> element are

Note that <p> can not contain several elements that, in ordinary usage, would be part of a proper paragraph, viz

So, for example, while an author would construct:

    <p>Abraham lincoln's famous speech
        <blockquote>Four score and seven...
    is an  example of blah blah blah

this must, in fact,be marked up as:

<p>Abraham lincoln's famous speech</p>
    <blockquote>Four score and seven...
<p>is an  example of blah blah blah

Similar workarounds must be employed for preformatted text, lists, and addresses.

Obsolete usage

In earlier versions of HTML, <p> was used in a different fashion, as a "paragraph separator" rather than as a "container". That is, <p> was used as an "empty" element (i.e. like <br>, it had no end tag) and was placed between paragraphs rather than marking the beginning of a paragraph, e.g.

This is the first paragraph.<P>
This is the second paragraph.

This usage is now obsolete and new documents should not employ it



Tag Minimization

Parent Elements

Top Elements
All Elements

htmlx DTD