<p>

BrandonDusch580 total contributions
Published Aug 3, 2021Updated Feb 12, 2023
Contribute to Docs
The <p>
element, also known as the paragraph element, contains and displays a block of text. They are among the most common text-based HTML elements.
They are block-level, which means it is as wide as its parent element and as tall as its content’s height. In addition, browsers automatically add a single blank line before and after each <p>
element.
Syntax
The paragraph element is enclosed by an opening <p>
tag and a closing </p>
tag:
<p>This is some text in a paragraph.</p>
Example
<!DOCTYPE html><html><body><div style="width: 50%; margin: auto; border: 2px solid black;"><p style="padding: 10px; font-family: system-ui;">It was love at first sight. The first time Yossarian saw the chaplain hefell madly in love with him. Yossarian was in the hospital with a painin his liver that fell just short of being jaundice.</p></div></body></html>
Accessibility with Paragraphs
Paragraphs are relatively easy for accessibility devices, such as screen readers, to find and process. The more <p>
elements, the better.
All contributors
- BrandonDusch580 total contributions
- shyamtawli1 total contribution
- Anonymous contributorAnonymous contributor88 total contributions
- christian.dinh2481 total contributions
- Anonymous contributorAnonymous contributor3077 total contributions
- BrandonDusch
- shyamtawli
- Anonymous contributor
- christian.dinh
- Anonymous contributor
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.