HTML Paragraphs, Line Breaks and Thematic Breaks
Organize prose into paragraphs
Use p to group related sentences. In ordinary rendering, repeated spaces and source newlines collapse; a new line in your file does not necessarily produce a new visible line.
<p>The trail opens at sunrise. Bring water.</p><p>Stay on the marked route.</p>Two paragraphs are displayed; the newline inside the first is ordinary whitespace.
Use br, hr and wbr deliberately
Use br where a line break is meaningful, such as a postal address. Use hr for a change of topic. wbr suggests a place to wrap a long word if space runs out. These three elements have no closing tag.
<p> 8 Pine Road <br> North Town</p><hr><p> Contact: trail <wbr> information</p>The address has two lines and the topic break separates the contact information. The suggested wrap may not be visible.
Avoid layout tricks
Do not repeat br to simulate paragraph spacing. A paragraph accepts text and inline markup, not another paragraph or a heading. Browsers may automatically close a paragraph when they encounter a heading; write explicit closing tags to make your intent clear.
<p>Morning plan.</p><h2>Afternoon</h2><p>Visit the library.</p>The heading is outside both paragraphs.
Practice and next steps
Write a two-line address and a separate paragraph of opening hours. Replace any unnecessary br tags with paragraphs.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Paragraphs and line breaks — Knowledge Check
Apply the concepts from Paragraphs and line breaks.
Which element marks a new paragraph?
What does wbr indicate?
Which is the best use for hr?
A poem needs line breaks within one verse. Which element fits?
You need more space between two paragraphs. What is the suitable approach?