The <p> element
The <p> tag defines a paragraph of text. Browsers automatically add vertical spacing before and after each paragraph, making it the standard way to structure body copy into readable blocks.
Last updated: October 3, 2026
Quick facts
| Category | Flow content, palpable content |
| Content model | Phrasing content — text and inline elements only |
| Tag omission | The end tag may be omitted if immediately followed by another block-level element, but writing it explicitly is best practice |
| Permitted parents | Any element that accepts flow content |
| DOM interface | HTMLParagraphElement |
Syntax
Live example
Edit the code below and watch the preview update instantly.
Attributes
| Attribute | Description |
|---|---|
| — | <p> has no attributes of its own — only the global attributes shared by every HTML element. |
Common examples
Paragraph spacing with CSS
Browsers add a margin above and below each paragraph. Control that gap with CSS instead of empty paragraphs.
A larger introduction paragraph
Give the opening paragraph a class to make it stand out, a common pattern on articles and landing pages.
Comfortable line length
Lines of about 60–75 characters are easiest to read. Limit the width of text blocks with the ch unit.
A drop cap on the first letter
Style the first letter of an article’s opening paragraph with the ::first-letter pseudo-element — no extra HTML needed.
<p> vs <br>
A <p> starts a new paragraph — a separate block of text with space around it. A <br> only breaks the line inside the same paragraph, with no extra space.
Use separate paragraphs for separate ideas, which is almost always what you want. Use <br> only where the line break is part of the content itself, such as the lines of a postal address or a poem.
| <p> | <br> | |
|---|---|---|
| What it does | Starts a new paragraph | Breaks the line |
| Spacing | Margin above and below | None |
| Use for | Separate ideas | Addresses, poems |
Common mistakes to avoid
- Empty paragraphs for spacing.
<p></p>or<p> </p>adds invisible clutter for screen readers. Use CSS margin. - Putting block elements inside a paragraph. A
<div>,<ul>or heading inside a<p>makes the browser close the paragraph early, so your styles stop applying. - Using paragraphs as headings. Bold text in a
<p>doesn’t create a section; use a heading. - Walls of text. One giant paragraph is hard to read on any screen. Break ideas into short paragraphs of a few sentences.
Accessibility & SEO tips
- Short paragraphs and a comfortable line height (about 1.5–1.7) make text easier to read, especially on phones and for people with dyslexia.
- Answer the main question in the first paragraph. Search engines and AI overviews often quote that opening paragraph directly.
- Mark text in another language with the
langattribute, e.g.<p lang="es">, so screen readers pronounce it correctly.
Browser support
Supported in every browser, including Chrome, Edge, Firefox, Safari and their mobile versions — it has been part of HTML since the very first versions.
Tutorials: How to change the font, How to change text color