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:

ParameterDescription
SizeSpecifies the thickness of the bar
WidthSpecifies the width of the bar in wither pixels or as a percentage
AlignIndicates how the bar should be placed on the page (left, centre, right)
NoshadeRemoves the shadow that normally appears below the bar
ColorSpecifies 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>

Related Articles

Check Also
Close
Back to top button

Adblock Detected

Please turn off your Adblocker to view your content.