In this tutorial we will guide you in drawing a line within a webpage. In HTML, ‘hr’ tag is used for this purpose. In previous versions of html, this tag was used for drawing a line in webpages but in advanced versions of HTML, it is used for applying a thematic break, however both concepts give the same functionality.
Step 1: Draw a line with <hr> tag in HTML
To draw a line in HTML,a tag is used called “hr ”tag .We just add the hr tag in the HTML Document and save the code. A horizontal line will be shown on the web page where the <hr> tag was inserted in the HTML Document.
For example:
<p>Main Page</p>
<hr>
<p>Paragraph starts here…</p>
A line can be observed in the output drawn using HTML hr tag
Step 2: Draw Multiple horizontal lines using <hr> tag in HTML
To draw multiple lines by html tag in a web page , the <hr> tag is added in the HTML Document multiple times. Horizontal lines will be shown on the page where the tags were inserted in the Document.
For Example:
<p>Main Page</p>
<hr>
<p>Paragraph starts here…</p>
<hr>