HTML Course

 

Page 5 : Page 5 - Horizontal Rules

A horizontal rule <HR> is a visual page break. They can serve not only as a visual break but also as an informational break. These Attributes Apply To The Horizontal Rule.

HTML Attribute Effect
SIZE=number Indicates how fat
the rule is
WIDTH=number
or WIDTH="%"
Indicates the width in pixels
or in % of page
ALIGN=LEFT
or RIGHT
or CENTER
Indicates the alignment.
works only in
combination with
the WIDTH= attribute

Example:

A Horizontal Rule With, Size, Width And Alignment <HR SIZE=4 WIDTH="60%" ALIGN=CENTER> Result This Line Below



Lets Add A Few Horizontal Rules
To Our Existing HTML Document.

<HTML>
<HEAD>
<TITLE>My First Web Page</TITLE>
</HEAD>
<BODY BGCOLOR="#000000" TEXT="#00FF00" LINK="yellow" VLINK="orange" ALINK="red">
<H1 ALIGN="CENTER">
<i><u>Welcome To My Home Page</u></i></H1>
<P>
<HR SIZE=4 WIDTH="80%" ALIGN=CENTER>
<HR SIZE=4 WIDTH="60%" ALIGN=CENTER>
<HR SIZE=4 WIDTH="40%" ALIGN=CENTER>
<P ALIGN="RIGHT">
<FONT SIZE="3" COLOR="white">
<b><tt>You have just entered<BR>
my first web page.<BR>
I'm just starting out <BR>
writting html, it's fun.</tt></b>
</FONT>
</BODY>
</HTML>

Click Here To See Our HTML Document So Far
Use Your Back Button To Return Here