English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <hr> tag defines HTML5The separator between paragraphs, as well as HTML 4.01The horizontal rule. This tag is also commonly referred to as the <hr> element.
Use the <hr> tag to separate when the theme of the content changes:
!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 The use of <hr> tags (Basic Tutorial Website oldtoolbag.com)</title> </head> <body> <body> <h1>Heading 1</h1> <p>This is the first paragraph.</p> <hr> <p>This is the second paragraph.</p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <hr> tag.
The <hr> tag defines a theme change in an HTML page (such as a topic shift) and is displayed as a horizontal line.
The <hr> element is used to separate content in an HTML page (or define a change).
The <hr> tag is in HTML5The separation between paragraphs.
In HTML5 The <hr> defines a change in the theme within the content and is displayed as a horizontal line.
In HTML 4.01 The <hr> tag is displayed as a horizontal line only.
In HTML 4.01 All layout attributes have been deprecated. In HTML5 No longer supports these attributes. Use CSS to define styles for the <hr> element.
In HTML, the <hr> tag does not have a closing tag.
In XHTML, the <hr> tag must be properly closed, such as <hr />.
Attribute | Value | Description |
---|---|---|
align | left center right | HTML5 Not supported. HTML 4.01 Deprecated. Specify the alignment of the <hr> element |
noshade | noshade | HTML5 Not supported. HTML 4.01 Deprecated. Specify the color presentation of the <hr> element as a solid color. |
size | pixels | HTML5 Not supported. HTML 4.01 Deprecated. Specify the height of the <hr> element. |
width | pixels % | HTML5 Not supported. HTML 4.01 Deprecated. Specify the width of the <hr> element. |
Support for <hr> tag Global attributes of HTML.
Support for <hr> tag HTML event attributes.