Articles → HTML → hr tag in HTML

hr tag in HTML






Purpose





Syntax


<hr />



Example


<html>
<head>
    <title>hr demo</title>
</head>
<body>
    <hr />
</body>
</html>



Output



Click to Enlarge


Attributes




Attribute NameValueDescription
Alignleft, right and centerSpecifies alignment of horizontal line.
Noshade Removes shading from horizontal line.
SizePixels or %Specifies the height of the horizontal line.
WidthPixels or %Specifies the width of the horizontal line.




<html>
<head>
    <title>hr demo</title>
</head>
<body>    
    <hr noshade />
</body>
</html>





Click to Enlarge



<html>
<head>
    <title>hr demo</title>
</head>
<body>
    <hr size="10" width="200" align="center" />
</body>
</html>





Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, October 05, 2016
 
Updated On  -  Saturday, September 16, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250