"http://www.w3.org/TR/REC-html40/strict.dtd"> P - Paragraph

The Web Design Group

P - Paragraph

Syntax <P>...</P>
Attribute Specifications
  • ALIGN=[ left | center | right | justify ] (horizontal alignment)
  • common attributes
Contents Inline elements
Contained in ADDRESS, APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The P element defines a paragraph. The closing tag for P is optional, but its use prevents common browser bugs with style sheets. Note that P cannot contain block-level elements such as TABLE and ADDRESS.

The deprecated ALIGN attribute suggests the horizontal alignment for the content of the paragraph on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting paragraph alignment.

HTML does not specify a presentation for the P element. Visual browsers commonly use block paragraphs with no first-line indent and separated by a blank line, but some browsers allow the user to specify a different presentation. An author can suggest paragraph indentation and spacing using style sheets. The following CSS ruleset suggests a possible presentation for paragraphs:

P { margin-top: 0; text-indent: 5% }

More Information