<p> is an HTML tag that is used to specify a paragraph. In the HTML 4 specification, p is defined as an block element, but cannot contain other block level elements. In addition, the HTML 4 specification states that the closing tag (</p>) is optional. By today's web standards, this is considered very bad form, which is why in XHTML the "p" tag is a block level element that does require a closing tag. Many people who are new to HTML (or E2) try to mistakingly use double br tags (<br><br>) when they should instead simply use a single p tag to denote a paragraph in their document.
See also: blockquote, br, caption, center, div, q
Attributes
The p tag does not have any required HTML attributes, but the following are all valid (italicized lines indicate attributes that are valid on E2):
Usage
To use the p tag, simply place opening and closing HTML tags around the text of your paragraph. For example:
<p align="left">This will be aligned to the left. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.</p>
<p align="center">This will be aligned to the center. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.</p>
<p align="right">This will be aligned to the right. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.</p>
<p align="justify">This will be left and right justified. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.</p>
On browsers which support this tag, the paragraphs will have padding around them, visually denoting them as separate paragraphs.
Everything2 Support?
E2 does provide limited support for the p tag. It does not allow the use of any of its HTML attributes except for align. Below is how your browser displays the example paragraphs from above on Everything2:
This will be aligned to the left. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.
This will be aligned to the center. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.
This will be aligned to the right. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.
This will be left and right justified. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin at pede nec ipsum mattis lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper, mauris sed faucibus tristique, erat massa molestie ante, sit amet tincidunt velit diam et lorem. In in wisi. Suspendisse accumsan est et nulla. Cras ut nibh. Maecenas convallis sem a elit. Nunc sem dui, facilisis at, pharetra vestibulum, condimentum id, sapien.
Previous HTML Tag: option (previous E2 supported HTML tag: ol)
Next HTML Tag: param (next E2 supported HTML tag: pre)
See Also: HTML tags and HTML attributes