HTML <p> tag

Updated: 10/11/2017 by Computer Hope

HTML p tagWhen writing in HTML, the <p> tag is a block element used to designate a paragraph. It is useful because Internet browsers add a bit of margin before after each element. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Tip: The default margins around paragraphs should be adjusted using CSS.

Example code

<p>Hey, I'm a paragraph with some text in me.</p>

Example result

Hey, I'm a paragraph with some text in me.

Deprecated attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The only attribute unique to the <p> tag is deprecated, meaning that it may function currently, but is not supported in going forward. In this case, CSS should be used in place of these attributes.

Attribute Description
align Designates the alignment of the text within a paragraph


Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All versions All versions

Browser, Compatibility, HTML <h1 to h6> tags, Paragraph, Web design terms