Ryan's District
November 22, 2008, 06:47:56 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: You are not allowed to view links.
Register or Login
How to Unlock Nokia mobile Phones

You are not allowed to view links.
Register or Login
Request any TV Show / series / Episodes / movie and we will get it for you for free

 
   Home   Help Search Chat Calendar Chess Shop Login Register  
Digg This!
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: HTML Reference Guide - The <HR> Tag  (Read 4500 times)
0 Members and 1 Guest are viewing this topic.
ben2ong2
Quality Poster
Paid
Hero Member
*****

Reputation: 17
Offline Offline

Gender: Male
Posts: 2374
9976.80 RD$

View Inventory
Send Money to ben2ong2

View Profile Awards
« on: October 03, 2006, 04:52:56 PM »

To separate blocks of text in a document you can use the simple but useful <HR> tag, which puts a straight line across the page. There is no ending tag for the horizontal rule. The very inclusion of <HR> introduces the separating line.

Some important points to remember when using this tag:

The browser starts the horizontal rule from a new line and any text after this tag is also displayed on a new line.
The browser introduces some space before and after this tag.


An <HR> tag without any attributes introduces a separator that looks like the one below.


--------------------------------------------------------------------------------

You can change the length, width, size, color and alignment of the horizontal rule using various attributes. Lets examine them.

WIDTH Attribute
This attribute defines the length of the rule. A value is required for this attribute. This value can be expressed in pixel numbers or percentage, which determines the length based on the width of the browser window.

<HR WIDTH="50"> presents a rule which is 50 pixels in length as:
--------------------------------------------------------------------------------

<HR WIDTH="70%"> specifies that the length of the rule should be 70% of the page's width as:
--------------------------------------------------------------------------------


SIZE Attribute
The SIZE defines the thickness of the horizontal rule. You can change the thickness by specifying the number of pixels with the value.

<HR SIZE="1">: 1 pixel thick.
--------------------------------------------------------------------------------

<HR SIZE="8">: 8 pixels thick.
--------------------------------------------------------------------------------

<HR SIZE="30">: 30 pixels thick.
--------------------------------------------------------------------------------


ALIGN Attribute
You can align horizontal rules using one of the three values for ALIGN attribute, "CENTER", "LEFT", or "RIGHT". The default value for this attribute is "CENTER". This means that if you skip using this attribute, the horizontal rule will always be centrally aligned.

<HR ALIGN="CENTER" WIDTH="50%">: Centrally aligned; there is no need to specify this explicitly as this is the default.
--------------------------------------------------------------------------------

<HR ALIGN="LEFT" WIDTH="50%">: Aligned to the left.
--------------------------------------------------------------------------------

<HR ALIGN="RIGHT" WIDTH="50%">: Aligned to the right.
--------------------------------------------------------------------------------


NOSHADE Attribute
You would have noticed that the horizontal rules are shaded, they have this 3D kind of effect. If you don't want this, use the NOSHADE attribute. NOSHADE takes no values.

<HR WIDTH="50%" NOSHADE SIZE="5">
--------------------------------------------------------------------------------

<HR WIDTH="50%" NOSHADE SIZE="15">
--------------------------------------------------------------------------------


The rendering of rules using NOSHADE differs in Internet Explorer and Netscape Communicator. Communicator tends to put rounded edges to rules if their thickness is more than 5 pixels.

COLOR Attribute
This is the first time you have encountered any color attribute in this tutorial. So I shall keep it small and simple leaving the details for later.
The COLOR attribute of <HR> is NOT recognized by Netscape Communicator (Communicator displays the non-shaded rules in a dull gray color only). The attribute takes a hexadecimal color notation or the name of the color.
(Huh? Confused... you'll find a thorough description on colors, here).

<HR COLOR="BLUE" SIZE="4" NOSHADE>: Blue colored rule, 4 pixels in thickness.
--------------------------------------------------------------------------------

<HR COLOR="RED" SIZE="10" WIDTH="50%" NOSHADE>: Red colored rule, 10 pixels in thickness.
--------------------------------------------------------------------------------


Also note how I have combined the various attributes inside a single tag to get the results I want.



Logged

You are not allowed to view links.
Register or Login
Free Paid Survey & Home Business Resources.

You are not allowed to view links.
Register or Login
Free Article Directory | Quality Content
Ryan's District
« on: October 03, 2006, 04:52:56 PM »

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Archive - WAP2 - WAP - imode
Sponsors: RAYAN.tv
-

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 2.169 seconds with 31 queries.

Google visited last this page Yesterday at 06:34:29 AM