What HTML tag is used for a horizontal rule?

The story behind the answer

The HTML tag used for a horizontal rule is `<hr>`.

The `<hr>` element represents a thematic break between sections of a document. Browsers traditionally render it as a horizontal line, which explains the name “horizontal rule,” but its meaning is structural rather than merely decorative. It can separate topic changes, scenes in a story, or shifts between sections of an article.

`<hr>` is a void element in modern HTML, so it does not have a closing tag and cannot contain text or child elements. Write it as `<hr>`; the XML-style `<hr />` is also commonly seen, but the slash is not required in HTML. Its visual appearance can be changed with CSS, including `border`, `height`, `color`, and `background` rules.

A common mistake is choosing `<br>`, which creates a line break within the same flow of text rather than a thematic separation. The invented `<line>` tag is not an HTML element, and `<wbr>` only marks a possible word-break location. Older HTML versions exposed presentational attributes such as `size` and `width` for `<hr>`, but CSS is the modern way to control its appearance.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: