HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Use the <hr> tag to define thematic changes in the content
The <hr>
tag defines a thematic break in an HTML page (e.g. a shift of topic).
The <hr>
element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.
Element | |||||
---|---|---|---|---|---|
<hr> | Yes | Yes | Yes | Yes | Yes |
The <hr>
tag also supports the Global Attributes in HTML.
The <hr>
tag also supports the Event Attributes in HTML.
Align a <hr> element (with CSS):
<hr style="width:50%;text-align:left;margin-left:0">
A noshaded <hr> (with CSS):
<hr style="height:2px;border-width:0;color:gray;background-color:gray">
Set the height of a <hr> element (with CSS):
<hr style="height:30px">
Set the width of a <hr> element (with CSS):
<hr style="width:50%">
HTML DOM reference: HR Object
Most browsers will display the <hr>
element with the following default values:
hr {
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 1px;
}