Back to course

Lesson 7: Paragraphs, Line Breaks, and Horizontal Rules

The HTML Masterclass: From Zero to Web Developer

7. Paragraphs, Line Breaks, and Horizontal Rules

7.1 Paragraphs (<p>)

The paragraph element (<p>) is the most common way to group blocks of text.

html

This is the first sentence in a paragraph. HTML automatically adds vertical space before and after the paragraph element, separating it from surrounding content.

This is a second, distinct paragraph. Even if the code is tightly written, the browser applies standard formatting.

7.2 Line Breaks (<br>)

The line break element (<br>) is an empty element that forces a single line break. Use it sparingly—only when the division of lines is part of the content (e.g., in a poem or an address).

html

123 Web Dev Lane
Suite 101
Markup City, 90210

7.3 Horizontal Rules (<hr>)

The horizontal rule element (<hr>) is an empty element that creates a thematic break or separator, often displayed as a line across the page.

html

Chapter One

The story begins...


Chapter Two

A new adventure unfolds...