HTML

Paragraph Tag

The HTML <p> element represents a paragraph of text. Use a separate paragraph element for each distinct paragraph rather than inserting repeated <br> tags to create paragraph spacing.

<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>

Paragraph spacing with CSS Top ↑

p {
  margin-block: 0 1rem;
  line-height: 1.6;
}

CSS controls spacing and appearance. Avoid obsolete presentational attributes such as align on paragraphs.

Do not put block content inside P Top ↑

A paragraph cannot contain many block-level structures such as another paragraph. Browsers may automatically close a <p> when such content begins, producing a DOM different from what the source appears to show.

Frequently Asked Questions Top ↑

What does the P element represent?

A paragraph of text.

Should I use BR tags to separate paragraphs?

No. Use separate P elements and CSS margins.

Can P contain another P?

No.

How do I align paragraph text?

Use CSS text-align.

How do I change paragraph spacing?

Use CSS margins and line-height.





plus2net.com










✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer