×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Paragraph and Line Break Elements: Text Formatting
Elements: Horizontal Line - HTML 5
10073    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.
Rabindranath Tagore
A lamp can only light another lamp when it continues to burn in its own flame.
Rabindranath Tagore
2267
40.89
Today So Far
Total View (Lakh)
softetechnologies
01/01/2018     34530
26/05/2018     32711
28/06/2017     31333
02/08/2017     29638
25/06/2018     27459
15/05/2017     24905
01/08/2017     24105
06/07/2017     23630
21/04/2018     19451
14/07/2017     19139
softetechnologies