HTML

HTML – HR Tag and Its Attributes With Syntax

This <hr> is the tag which draws a horizontal line across whole page, whenever it is specified it will draw the line.

The <hr> tag is singular tag, it means the <hr> tag does not contain closing tag. <hr> tag defined as,

<h3>Heading 3.1</h3>
<p> Hello World ! Learn HTML</p>
<hr>
<h3>Heading 3.2</h3>
<hr>
<p> Hello WOrld ! How are you?</p>

It can have attributes its attributes are given:

Parameter Description
Size Specifies the thickness of the bar
Width Specifies the width of the bar in wither pixels or as a percentage
Align Indicates how the bar should be placed on the page (left, centre, right)
Noshade Removes the shadow that normally appears below the bar
Color Specifies the colour of the bar; if omitted the default is a dark grey.

Try Yourself:

<html>
<head>
</head>
<body>
<h3>Chapter 1.</h3>
<hr width='100%' size='5px'>
<p>The quick brown fox jumps over the lazy dog. </p>

<h3>Chapter 2.</h3>
<p> I recooment you to poass this time on the body test</p>
<hr align:left >

<h3>Chapter 3.</h3>
<p> I recooment you to poass this time on the body test</p>
<hr align:center/>

<h3>Chapter 4.</h3>
<p> I recooment you to poass this time on the body test</p>
<hr align:right/>
</body>
</html>
Back to top button