HTML <hr> Tag

Description

The <hr> HTML element (short for horizontal rule) draws a horizontal line, which in its appearance depends on the parameters used, as well as the browser.

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

Attribute Definition
align Specifies the alignment of a hr element.
noshade Specifies that a hr element should render in one solid color (noshaded), instead of a shaded color.
size Specifies the height of a hr element.
width Specifies the width of a hr element.

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

Desktop
Explorer Edge Chrome Firefox Opera Safari
YesYesYes1YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes

Last updated by CSSPortal on: 6th December 2019