The HTML Artwork HTML Paragraph Element


Paragraph tags delineate paragraphs. Browsers typically render a blank line between paragraphs. This section of this document illustrates the need to include paragraph tags in your HTML sources. If you do not include <P> tags in your documents, your document will appear as one long paragraph (perhaps with some breaks if you use other elements such as lists or headers). Although there is a blank line before this sentence in the HTML source, there is no P tag, so the browser will not recognize the start of a new paragraph. It should appear as one long paragraph in your browser. In HTML 2, there is no requirement to close a P tag. However, it is good practice to do so since later versions of HTML include extra attributes for the P tag (such as ALIGN) that will work more cleanly if P tags are closed.
Here are the same three paragraphs, but with the P tag at the beginning of each one.

Paragraph tags delineate paragraphs. Browsers typically render a blank line between paragraphs. This section of this document illustrates the need to include paragraph tags in your HTML sources. If you do not include <P> tags in your documents, your document will appear as one long paragraph (perhaps with some breaks if you use other elements such as lists or headers).

Although there is a blank line before this sentence in the HTML source, there is no P tag, so the browser will not recognize the start of a new paragraph. It should appear as one long paragraph in your browser.

In HTML 2, there is no requirement to close a P tag. However, it is good practice to do so since later versions of HTML include extra attributes for the P tag (such as ALIGN) that will work more cleanly if P tags are closed.


Using the /P tag may cause an extra blank line to be inserted.

There is no </P> at the end of this paragraph.


There is a </P> at the end of this paragraph.


ALIGN Attribute

An ALIGN attribute was added to P in HTML 3.2. It make take the value of center, left and right.

This is a paragraph with ALIGN=CENTER.

This is a paragraph with ALIGN=RIGHT.

This is a paragraph with ALIGN=LEFT, which is the default.


Inline style sheets can be used to change the font and text alignment on the fly. The attribute STYLE="font-family:Arial;text-align:justify" is used with this paragraph.


[HTML CD Home Page]

Vivian Neou, vivian@catalog.com
Copyright © 1999 Vivian Neou