×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Paragraph and Line Break Elements: Text Formatting
Elements: Horizontal Line - HTML 5
11011    Arnab De    04/05/2017

Introduction

<hr> tag is use for the place a horizontal line on the page.

Width of Horizontal Line

By default the width of the line is 100%. But we can set the width of the line by using width attribute of the <hr> tag.

Full Width Line


Width is 50%


softetechnologies

Alignment of the Horizontal Line

By default the alignment of the line is center. But we can set or alter the alignment of the line by using align attribute of the <hr> tag. This attribute only act when the value of width attribute changed.

Center align line


Alignment set to left.


Color of the Horizontal Line

By default the colour of the line is gray. But we can change it by the color attribute.

Alignment set to left.


softetechnologies

Complete Example

Full Width Line
<hr>

Width is 50% default alignment is center.
<hr width="50%" />

 

Width is 50%. Set the alignment is left.
<hr align="left" width="50%" />

 

Red Color Line
<hr width="50%" />

 

 

HR Tag
HR Tag
Paragraph and Line Break Elements: Text Formatting
softetechnologies
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
Albert Einstein
Pure mathematics is, in its way, the poetry of logical ideas.
Albert Einstein
16233
52.48
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     41979
01/01/2018     35991
28/06/2017     34082
25/06/2018     33432
02/08/2017     32394
01/08/2017     26807
06/07/2017     26785
15/05/2017     26415
14/07/2017     21851
21/04/2018     20711
softetechnologies