CSS Portal

HTML <hr> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <hr> element represents a thematic break in an HTML page. It is typically used to separate content into distinct sections, signaling a change in topic or a shift in the narrative flow. Visually, browsers usually render <hr> as a horizontal line, but the exact appearance - thickness, style, or color - can vary depending on the browser’s default styling or custom CSS applied by the developer.

Semantically, <hr> is more than just a decorative line; it conveys meaning about the document’s structure. It helps users and assistive technologies, such as screen readers, understand that the content is divided into separate thematic areas. For example, in an article, <hr> might indicate a shift from the main content to a sidebar or a transition between different sections of a story.

The <hr> element is a void element, meaning it has no closing tag and cannot contain any content. Its primary purpose is structural rather than content-driven, and it is commonly used in combination with CSS to create visually distinct breaks, including solid lines, dashed lines, or even custom gradients.

Properties

Permitted Parents
Any element that accepts flow content
Content
None. It is an empty element.
Start/End Tags
Start tag: required, End tag: forbidden

Example

<p>This is some text.</p>
<hr>
<p>This is some text.</p>

Attributes

None

Global Attributes

The <hr> tag also supports the Global Attributes in HTML5

Event Attributes

The <hr> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <hr> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!