Welcome to this article here in this article, we will discuss the Html hr tag, and how to use the hr tag in Html. So let’s start with the topic.
What is the hr tag in Html?
The hr tag actually stands for the horizontal ruler in our Html tag.
And it actually use to draw horizontal lines.
The hr tag is actually the unpair tag which means there is only one tag that will contain both the tag opening tag as well as closing tag. There is no separate opening hr or closing hr tag.
Hr tag is also a kind of block level tag and it takes the entire width of its parent of the browser window.
There are lots of attributes of HTML and we will discuss all these tags one by one. So let’s start the discussion.
Color:
This is an important attribute of the hr tag and it actually uses to define the color of our horizontal rule.
Syntax:
<hr color=”red”/>
We can also give the hr color in the hexadecimal values.
Width:
This actually uses to define the width of our hr rule.
Syntax:
<hr color=”green” width=”100”>
This will automatically display the hr width in 100 pixels. And we can define the hr width with the percentage also.
Size:
The size actually indicates the Html hr thickness. This value also measures pixels also. And the percentage won’t work for the thickness of the hr line.
Syntax:
<hr color=”blue” width=”20%” size=”5”/>
Align :
This attribute used to set the alignment of our hr line text. We can define the hr alignment in three areas in the left side, the right side, or the center position.
And by default, it is actually set in the left position.
Syntax:
<hr color=”blue” width=”20%” size=”10” align=”right”/>
Example of hr tag in Html:

and here is the output

Conclusion:
This article is all about the Html hr tag and here I explain how to use this within Html, I hope you like this article and if you have any kind of query then please ask me at pmitra459@gmail.com.
And please follow our website for this kind of informational article.