We already know with Horizontal Rule in HTML page. The Horizontal Rule attribute is same as horizontal rule, but only the difference is that former have attribute to define the property of a line or a paragraph.
Understand with Example
The Tutorial illustrates an example from Horizontal Rule Attribute in HTML. In this Tutorial, the code apply a horizontal rule between two lines with attribute color red and between two paragraphs of size 6 in html page.
The common attribute used in horizontal rule in line or paragraph are -
<color> :This attribute define the color of line in a HTML page.
<size> : The <size> attribute in HTML page define the size between the two paragraph.
<p> :This define the paragraph of HTML page.
<hr> :The <hr> define the horizontal rule, which separate two lines or paragraph in a HTML page.
The code is saved with .html extension
<html> <head><title>......</title></head> <body> <p>Horizontal Rule between two lines with a color:</p> This is the first line.<hr color="red"/> This is the second line.<br/> <p>Horizontal Rule between two paragraphs with size 6:</p> <p>This is the first paragraph</p><hr size="6"/> <p>This is the second paragraph</p> </body> </html>
Place the path of saved code in url of your browser. The code on execution is displayed as
|Horizontal Rule between two lines with a color:
This is the first line.
This is the second line.
Horizontal Rule between two paragraphs with size 6:
This is the first paragraph
This is the second paragraph
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: December 3, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles