<p>
A paragraph of text.
Syntax
<p>Paragraph text</p>Examples
Two paragraphs — the browser adds space between them:
<p>Our coffee shop opened in 2015.</p>
<p>Today we roast our own beans every week.</p>The space between paragraphs is set in CSS:
<style>
p { margin: 0 0 4px; line-height: 1.6; }
</style>
<p>First paragraph with tighter spacing.</p>
<p>Second paragraph right below.</p>Notes
A <p> may contain only text and inline elements (<a>, <strong>, <span>…). Blocks like <div>, <ul> or another <p> are not allowed inside — the browser closes the paragraph early. Do not use empty paragraphs for spacing: set the distance with margin.
See also
Related recipes
In the tutorial
- Headings and paragraphs — Six levels of headings, paragraphs, spaces and line breaks, the thematic break and quotes in HTML.