Line Breaks and Horizontal Rules


Sometimes you need to move text to a new line or separate content visually without starting a new paragraph.

HTML provides special tags for this purpose, such as <br> for line breaks and <hr> for horizontal rules.

The <br> Tag (Line Break)

The <br> tag is used to insert a line break within text. It moves the content that follows to the next line.

The <br> tag is an empty tag, which means it does not have a closing tag.

In this example, the <br> tag breaks the text into multiple lines without creating separate paragraphs.

Line breaks are useful for addresses, poems, or short text where spacing is required within the same paragraph.

The <hr> Tag (Horizontal Rule)

The <hr> tag is used to create a horizontal line across the page. It is commonly used to separate sections of content.

Like <br>, the <hr> tag is also an empty tag.

The horizontal line visually separates the content into sections, making the page easier to read.

The appearance of the <hr> line can later be customized using CSS.

When to Use <br> and <hr>

  • Use <br> for small line breaks inside text
  • Use <hr> to separate major sections
  • Do not use <br> repeatedly to create space
  • Use paragraphs and headings for structure

Common Mistakes

Beginners often use multiple <br> tags to add spacing between content. This is not a good practice.

Spacing and layout should be handled using paragraphs, headings, and CSS instead.

Why These Tags Matter for Jobs

Professional developers use <br> and <hr> carefully to improve readability without breaking structure.

Correct usage shows that you understand semantic HTML and clean content layout.

Practice Task

Create a simple page with two sections separated by a horizontal rule. Inside one section, use line breaks to display an address.

What You Will Learn Next

In the next lesson, you will learn about HTML text formatting tags used to emphasize content.