Home Html Horizontal Rule Attribute in HTML
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Horizontal Rule Attribute in HTML

Advertisement
We already know with Horizontal Rule in HTML page. The Horizontal Rule attribute is same as horizontal rule

Horizontal Rule Attribute in HTML

     

 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

 

Download

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 3, 2008

Ask Questions?    Discuss: Horizontal Rule Attribute in HTML  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com