Content · Web Development · HTML

HTML <hr> Element: Thematic Breaks

An hr marks a thematic change between parts of a document. Browsers usually draw a horizontal rule, but the meaning is more important than the line.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

An hr marks a thematic change between parts of a document. Browsers usually draw a horizontal rule, but the meaning is more important than the line.

What You Need to Know


Use CSS borders when the goal is decoration alone. A meaningful hr indicates that the story is changing direction.

The goal is not to collect as many tags as possible. Pick the element that best describes what the content really is.

Example: See It in Action


Try this markup in a fresh practice file. The next section explains the parts worth paying attention to.

This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.

<section>
    <h2>Getting started</h2>
    <p>Read this first.</p>
    <hr>
    <p>Now try the next activity.</p>
</section>

Let’s Understand the Example


  • An hr marks a change of topic or scene. Its line-like appearance is just the usual browser styling.
  • Section groups content around a shared topic and usually has a heading.
  • An h2 starts a major section beneath the page topic.

You should see a readable heading and its related content. The heading level tells readers how the ideas fit together, not merely how large the letters look.

What Should You See?


The page should display “Getting started” as a heading, followed by its related content. Change the heading text and refresh the browser to see the result.

Read only the headings, from top to bottom. Do they tell a sensible story? If not, move sections or choose levels that match the content.

Try It Yourself


  1. Place a thematic break between two different parts of a short story.
  2. Save your changes, open or refresh the page, and compare the result with the original example.
  3. Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.

Common Beginner Mistakes


  • Adding hr after every heading purely as decoration.
  • Avoid picking tags just for their default bold, italic or spaced appearance. Use CSS for presentation.

Key Takeaways


  • An hr marks a thematic change between parts of a document.
  • An hr marks a change of topic or scene. Its line-like appearance is just the usual browser styling.
  • Use CSS borders when the goal is decoration alone. A meaningful hr indicates that the story is changing direction.
Share this resourceSend this page to someone who may find it useful.