HTML <p>Tag


Examples

The following code defines a paragraph:

<p>This is a paragraph.</p>

Try it Yourself »
(At the bottom of the page, you can find more examples)

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Currently most browsers support the <p> tag.


Definition and Usage

The <p> tag defines a paragraph.

The <p> element automatically creates some whitespace before and after itself. The browser automatically adds these spaces, and you can also specify them in a stylesheet.


Differences between HTML 4.01 and HTML5

In HTML 4.01, the align attribute of the tag is deprecated, and HTML5 does not support this attribute.


Attributes

Attribute Value Description
align left
right
center
justify
Not supported in HTML5. Deprecated in HTML 4.01.Deprecated. Use styles instead. Specifies the alignment of the text in a paragraph.


Global Attributes

The <p> tag supports global attributes. View the full attribute tableHTML Global Attributes。


Event Attributes

The <p> tag supports allHTML Event Attributes。


Related Articles

HTML Tutorial:HTML Paragraphs

Other Extensions