How to work with Horizontal line in HTML

In this article I will explain how to add the horizontal line in HTML.
  • 2071

Horizontal Rule

 

The horizontal line can design by using <hr> tag.

 

<html>

<head>

    <title>HTML Example</title>

</head>

<body>

    Gud Morning<hr />

    Have a nice day !<hr />

</body>

</html>

 

Output
 

Gud Morning
Have a nice day !

We can also change the color of the horizontal line. If we want we can change the width of the horizontal line.

HTML code:

<html>
<head>
    <title></title>
</head>
<body>
    I am the best
    <hr width="50%" color="green"></hr>
    person of the world.
</body>
</html>


Output

I am the best
person of the world.

Here horizontal line is coming in green color and its width is 50% in size.

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.