Paragraphs and Line Breaks
You'll learn: How to structure text into readable paragraphs and force line breaks when needed.
The Core Idea
When you write text in an HTML document, the browser ignores extra spaces and line breaks in your code. To create proper paragraphs and control where lines break, you need two simple elements: <p> for paragraphs and <br> for line breaks.
The <p> Element
The <p> element wraps a complete paragraph of text. Think of it like hitting "Enter" twice in a word processor—it creates a distinct block of text with space above and below:
<p>This is my first paragraph. It contains several sentences about one topic.</p>
<p>This is a second paragraph. The browser automatically adds space between paragraphs.</p>
Each <p> element is a semantic container that tells both browsers and assistive technologies: "This is a complete thought or idea."
The <br> Element
Sometimes you need a line break within a paragraph without starting a new one. The <br> element forces text to the next line:
<p>123 Main Street<br>
Springfield, IL 62701<br>
United States</p>
Notice <br> is self-closing—it has no content inside. Use it sparingly, typically for addresses, poems, or formatted text where the line break is meaningful.
When to Use Which
Use <p> for logical blocks of related sentences. Use <br> only when the line break itself carries meaning (like in an address). Don't use multiple <br> tags to create space—that's CSS's job, which you'll learn later.
Key Takeaway: The <p> element structures text into semantic paragraphs with automatic spacing, while <br> creates explicit line breaks within content when the break itself is meaningful.