The HTML <p>
element represents a paragraph of text. Paragraphs are usually represented in visual media as blocks of text that are separated from adjacent blocks by vertical blank space and/or first-line indentation. Paragraphs are block-level elements.
Content categories | Flow content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | The start tag is required. The end tag may be omitted if the <p> element is immediately followed by an <address> , <article> , <aside> , <blockquote> , <div> , <dl> , <fieldset> , <footer> , <form> , <h1> , <h2> , <h3> , <h4> , <h5> , <h6> , <header> , <hr> , <menu> , <nav> , <ol> , <pre> , <section> , <table> , <ul> or another <p> element, or if there is no more content in the parent element and the parent element is not an <a> element. |
Permitted parents | Any element that accepts flow content. |
Permitted ARIA roles | Any |
DOM interface | HTMLParagraphElement |
Attributes
This element includes the global attributes.
Note: The align
attribute on <p>
tags is obsolete and should no longer be used.
Example
<p>This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.</p> <p>This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph.</p>
The result of this code is:
Specifications
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of '<p>' in that specification. |
Living Standard | No change since the latest W3C snapshot HTML5 |
HTML5 The definition of '<p>' in that specification. |
Recommendation | align attribute is obsolete |
HTML 4.01 Specification The definition of '<p>' in that specification. |
Recommendation | Initial definition |
Browser compatibility
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 1.0 | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
See also
Document Tags and Contributors
Tags:
Contributors to this page:
sideshowbarker,
libbymc,
mfluehr,
shoelaces,
bunnybooboo,
crimsy,
prabhatanche,
Tigt,
jswisher,
gnardell,
teoli,
Sebastianz,
shamimahsan600,
Sheppy,
kscarfone,
pablofiumara,
justleroy,
ethertank,
odraencoded,
tregagnon,
medicdude,
iamjessklein,
Bzbarsky,
cers,
hobophobe,
McGurk,
osdm,
fscholz,
Mgjbot,
PablO
Last updated by:
sideshowbarker,