**`<hr>`** ("horizontal rule") semantically marks a **thematic break** — a shift in topic within a section, a scene change in a story, or a transition between distinct groups of content — and browsers render that break as a horizontal line by default. It's a **void element**, meaning it has no closing tag and no content (`<hr>`, not `<hr></hr>`). Like `<big>` and `<font>`, it used to be purely presentational in early HTML, but HTML5 redefined it with genuine semantic meaning.
1Understanding <hr>
`<hr>` ("horizontal rule") semantically marks a thematic break — a shift in topic within a section, a scene change in a story, or a transition between distinct groups of content — and browsers render that break as a horizontal line by default. It's a void element, meaning it has no closing tag and no content (<hr>, not <hr></hr>). Like <big> and <font>, it used to be purely presentational in early HTML, but HTML5 redefined it with genuine semantic meaning.
Don't use <hr> purely for visual decoration between unrelated design sections — if you just want a styled divider line with no topic-break meaning, use a CSS border on a <div> instead.
<article>
<p>Chapter 1 content...</p>
<hr>
<p>Chapter 2 content...</p>
</article>2Practical Example
Here is a real-world application of <hr> showing how it is used in production HTML.
<!-- Styling the default line via CSS -->
<style>
hr { border: none; border-top: 2px dashed #ccc; }
</style>
<p>Before</p><hr><p>After</p>3Best Practices
Follow these guidelines when working with <hr>:
1. Use <hr> to indicate an actual thematic/topic break in content, not just decoration
2. Remember it's a void element — no closing tag or children
3. Use CSS borders on a styled <div> for purely decorative divider lines with no semantic break
Tip: Don't use <hr> purely for visual decoration between unrelated design sections — if you just want a styled divider line with no topic-break meaning, use a CSS border on a <div> instead.
<article>
<p>Chapter 1 content...</p>
<hr>
<p>Chapter 2 content...</p>
</article>