Curriculum ▸ HTML Zero → Mastery ▸ Lesson 15: Horizontal Rules (<hr>) Foundations

Lesson 15 — Horizontal Rules <hr>

Learning Goals

Part 1 — What is <hr>?

The <hr> element creates a **horizontal rule** — a line that indicates a **thematic break** between sections of content.

It is a **semantic element**, meaning it conveys meaning (separation) beyond just appearance.

Part 2 — Example

<h1>My Blog</h1>
<p>Welcome to my blog!</p>
<hr>
<h2>Latest Post</h2>
<p>Here is my newest article...</p>

Result: The <hr> visually separates the intro from the main content.

Part 3 — Best Practices

Part 4 — Common Mistakes

Quick Quiz

  1. What does <hr> represent semantically?
  2. Should you style <hr> with CSS or add multiple tags?
  3. Give an example of when to use <hr>.
Sample Answers
  • A thematic break between sections of content.
  • With CSS — don’t add many <hr> tags for effect.
  • To separate an introduction from the main article.

Mini Project — Resume Section

Create a resume page with sections for Education, Experience, and Skills, separated by <hr>.

Lesson 15 Dictionary

hr (<hr>)
An element that creates a horizontal rule, representing a thematic break.
Thematic Break
A meaningful division in content, marked visually with <hr>.