HTML <hr> Tag
Description
The <hr>
HTML tag, short for "horizontal rule," is a self-closing element used to create a thematic break or a visible horizontal line on a web page. It is typically employed to separate content or sections, enhancing the page's structure and readability. While 'hr' used to be styled as a simple horizontal line, modern web design often utilizes CSS to customize its appearance, allowing for various line styles, colors, and widths to better integrate with the overall design of the webpage.
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 table will show you the current browser support for the HTML <hr>
tag.
Desktop | |||||
12 | 1 | 1 | 12.1 | 3 |
Tablets / Mobile | |||||
18 | 4 | 12.1 | 1 | 1 | 4.4 |
Last updated by CSSPortal on: 30th March 2024