Paragraphs & Line Breaks

All HTML topics
∙ Chapter 04

Paragraphs & Line Breaks

The <p> tag defines a paragraph. Browsers automatically add space before and after each one.

<p>
Paragraph block. Adds top & bottom spacing automatically.
<br>
Line break — new line without starting a new paragraph. Self-closing.
<hr>
Horizontal rule — draws a divider line across the page. Self-closing.
<pre>
Preformatted — preserves spaces and line breaks exactly as typed.
ℹ️Extra spaces or pressing Enter in HTML code does nothing visible — only tags create visual spacing.
paragraphs.php
📝 Edit Code
👁 Live Preview
💡 <br> and <hr> have no closing tags — they are self-closing elements.