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.
This is an important attribute of the hr tag and it actually uses to define the color of our horizontal rule.
We can also give the hr color in the hexadecimal values.
This actually uses to define the width of our hr rule.
<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.
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.
<hr color=”blue” width=”20%” size=”5”/>
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.
<hr color=”blue” width=”20%” size=”10” align=”right”/>
Example of hr tag in Html:
and here is the output
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 [email protected]
And please follow our website for this kind of informational article.
Hii, My name is Pallab Mitra founder of this blog and here i share my knowledge about – hardwares, gaming, softwares, and other technical factors.