**`<p>`** is a block-level element: browsers render it on its own line, with a small default top/bottom margin separating it from neighboring elements. Historically, `<p>` doesn't strictly require a closing tag — browsers automatically close an open `<p>` when they hit another block-level element — but explicit closing tags are still best practice for clean, predictable markup and for tools that parse your HTML.
1Understanding <p>
`<p>` is a block-level element: browsers render it on its own line, with a small default top/bottom margin separating it from neighboring elements. Historically, <p> doesn't strictly require a closing tag — browsers automatically close an open <p> when they hit another block-level element — but explicit closing tags are still best practice for clean, predictable markup and for tools that parse your HTML.
Never nest a <p> inside another <p>, or put block-level elements like <div> or <table> inside one — the browser's error-recovery will silently close the paragraph early, often breaking your intended layout.
<p>HTML paragraphs are block-level elements.</p>
<p>Each one starts on a new line automatically.</p>2Practical Example
Here is a real-world application of <p> showing how it is used in production HTML.
<!-- Browsers auto-close an open <p> before a new block element -->
<p>Text before
<div>A div, which implicitly closes the paragraph above</div>3Best Practices
Follow these guidelines when working with <p>:
1. Use <p> only for actual prose/text content, not for layout spacing
2. Don't nest block-level elements (<div>, <ul>, <table>) inside a <p>
3. Use CSS margin/padding for spacing, not empty <p> </p> tags
Tip: Never nest a <p> inside another <p>, or put block-level elements like <div> or <table> inside one — the browser's error-recovery will silently close the paragraph early, often breaking your intended layout.
<p>HTML paragraphs are block-level elements.</p>
<p>Each one starts on a new line automatically.</p>