Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials HTML Paragraphs & Line Breaks
HTML Beginner FREE

Paragraphs & Line Breaks

Lesson 2 of 16 Beginner Interactive

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

Line Break

Use <br> to add a line break inside a paragraph without starting a new paragraph.

Horizontal Rule

Use <hr> to create a horizontal line (thematic break) to separate content.

Syntax

HTML
<p>First paragraph of text.</p>
<p>Second paragraph of text.</p>

<p>This is a paragraph<br>with a line break.</p>

<hr>
Paragraphs and Line Breaks
HTML
<!DOCTYPE html>
<html>
<body>
    <p>First paragraph with enough text to see how it wraps across the line.</p>

    <p>Second paragraph starts here.</p>

    <p>Line one<br>
    Line two<br>
    Line three</p>
</body>
</html>

Practice

1
Exercise

Write two paragraphs about your favorite subject.

Answer
<p>My favorite subject is web development.</p>
<p>I enjoy creating websites and learning new technologies.</p>

Quick Quiz

1

Which tag creates a line break?

The <br> tag inserts a single line break.

Interview Questions

<br> creates a line break within the same paragraph. <p> creates a new paragraph with spacing above and below. Use <p> for separate blocks of text and <br> for breaks within a block.