From http://www.w3schools.com (Copyright Refsnes Data)

HTML <p> tag


Example

A paragraph is marked up as follows:

<p>This is some text in a paragraph.</p>

Try it yourself!  (more examples at the bottom of this page)


Definition and Usage

The <p> tag defines a paragraph.

The p element automatically creates some space before and after itself. The space is automatically applied by the browser, or you can specify it in a style sheet.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <p> tag is supported in all major browsers.


Differences Between HTML and XHTML

All "presentation attributes" of the p element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.


Optional Attributes

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
align left
right
center
justify
Deprecated. Use styles instead.
Specifies the alignment of the text within a paragraph
TF

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.


Try-It-Yourself Demos

More paragraphs
Some of the default behaviors of paragraphs.

Poem problems
Example of how you can NOT write a poem in HTML.


From http://www.w3schools.com (Copyright Refsnes Data)