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. 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.

XHTML 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