HTML <hr> tag

Updated: 10/11/2017 by Computer Hope

HTML hr tagWhen writing in HTML, the <hr> tag is a block element used to denote a thematic break on a web page. It is useful when you are changing a topic or want to separate content on a page. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Example code

<h3 class="ce">Here is a heading about one subject.</h3>


<p class="ce">Here is a paragraph about a different subject.</p>

Example result

Here is a heading about one subject.

Here is a paragraph about a different subject.

Deprecated attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the deprecated unique HTML attributes for the <hr> tag, as well as a description of each. While these attributes may work with the some versions of HTML, they will eventually be phased out. You should use CSS to adjust the appearance and position of the <hr>element.

Attribute Description
align Designates the alignment of the <hr> element
noshade Designates that the <hr> element should be one solid color
size Designates the height of the element
width Designates the width of the element


Internet Explorer Firefox Safari Opera Chrome
All versions All versions All version All versions All versions

Browser, Compatibility, Class, Web design terms