HTML <p> Tag

Description

The <p> HTML element is used for defining a paragraph. In a typical browser, one line is inserted before and after <p> ~ </p>, but if the purpose is to simply break a line, please use the <br> tag instead of the <p> tag. It is recommended to use CSS if you want to set the appearance of the document, such as adjusting the spacing between paragraphs. In CSS, you can make the width between paragraphs wider or narrower, so you can specify a finer layout. In that case, general margin properties and padding properties are used.

Properties

Permitted Parents
Any element that accepts flow content
Content
Inline and text
Start/End Tags
Start tag: optional, End tag: optional

Example

<p>This is some text in the p tag</p>
<p>This is more text using a new paragraph</p>

Attributes

None

Global Attributes

The <p> tag also supports the Global Attributes in HTML5

Event Attributes

The <p> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <p> tag.

Desktop
Edge Chrome Firefox Opera Safari
1211151
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18414114.4

Last updated by CSSPortal on: 30th March 2024