Coding/Learn/html/paragraphs text
HTML Beginner Course
01.Introduction to HTML
02.Anatomy of an HTML Element
03.The Sacred HTML5 Skeleton
04.Headings (h1 to h6)
05.Paragraphs, Line Breaks & Dividers
06.Text Formatting & Emphasis
07.Hyperlinks & Navigation (<a>)
08.Images & The Sacred Alt Text (<img>)
09.Ordered & Unordered Lists (<ul>, <ol>, <li>)
10.Block vs Inline Elements
11.Generic Containers (<div> & <span>)
12.Semantic HTML (<header>, <nav>, <main>, <footer>)
13.Tables (<table>, <tr>, <th>, <td>)
14.Native Audio & Video Elements
15.The Invisible Brain (<head> & Meta Tags)
16.Interactive Forms (<form>)
17.Input Types (<input>)
18.Accessible Labels & Submit Buttons
19.Textareas & Select Dropdowns (<textarea>, <select>)
20.Capstone: Building Your First Web Profile Page
Course Certificate0%

Complete all lessons to earn

LearnParagraphs, Line Breaks & Dividers
5 / 20 0%
Lesson 05 of 20
4 mins read

Paragraphs, Line Breaks & Dividers

PreviousNext Lesson
In Plain English

Content without paragraphs is an unreadable wall of text. The <p> tag formats text blocks with automatic margins. When you need a break without a new paragraph, use self-closing <br>, and use <hr> to draw clean dividers.

The Mental Model

"<p> is like starting a new paragraph in a novel. <br> is like hitting Shift+Enter in a chat window to drop to the next line without sending the message. <hr> is drawing a crisp dividing line in your notebook."

Deep Dive: How It Works

<p>: Wraps standard prose text. Browsers automatically add top and bottom spacing around paragraphs.

<br>: Stands for "break". It is an "empty" or self-closing tag (no </br> required). It forces an immediate line break.

<hr>: Stands for "horizontal rule". Draws a thematic divider line between topics.

Syntax Blueprint

<p>Line 1<br>Line 2</p>
<hr>
<p>Next Topic</p>

<p> contains text, <br> creates single-line breaks, <hr> creates horizontal dividers.

PointCore Rules to Remember

Point star
Self-Closing Tags: <br> and <hr> do not wrap content, so they do not have closing tags.
Point star
Don't Abuse <br>: Never stack five <br><br><br><br><br> tags to make space—use CSS margin instead!
Point star
Thematic Dividers: <hr> is perfect for visually separating different sections or articles.

Common Beginner Traps & How to Fix Them

Mistake:Writing </br> or </hr>

Why it happens: Assuming every single tag requires a closing counterpart.

How to fix: Tags without inner content like <br>, <hr>, and <img> are self-closing void elements.

Pro Tip: Always group related sentences into logical <p> tags rather than one giant block of text.

Live Interactive Example

Hit Run Code to see it live
Paragraphs with Breaks and Dividers
HTML5
1
2
3
Live Browser Preview
Click "Preview / Apply" to view the rendered output.
How it works: <br> breaks the sentence to the next line, and <hr> creates a divider between paragraphs.

Your Turn: Micro Challenge

No pressure! Edit the starter code below and test your solution with instant feedback.

Micro Exercise

Create two paragraphs with a horizontal divider

  • PointWrite a <p> tag containing "First Section"
  • PointAdd a horizontal rule <hr>
  • PointWrite a second <p> tag containing "Second Section"
1
2
Browser Preview & Output
Click "Check HTML" to test your solution.

Finished reading and practicing?

Mark this lesson as completed to update your course progress.

PreviousNext Lesson
Overview100 SheetLearnCertificates