×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Paragraph and Line Break Elements: Text Formatting
Elements: Horizontal Line - HTML 5
11616    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
I never teach my pupils, I only provide the conditions in which they can learn.
Albert Einstein
2458
63.25
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     46579
25/06/2018     38731
01/01/2018     38408
28/06/2017     36338
02/08/2017     35043
01/08/2017     29316
06/07/2017     29073
15/05/2017     28601
14/07/2017     24431
11/09/2018     23465
softetechnologies