Click here to bookmark this site! Home | Contact | About | Site Map  
 

Quick Menu

Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24


Beginner

 

17. Horizontal Rules

We won't be modifying any of our web pages here -- you can for now review the information and then decide if you want to experiment with it on your pages.

LINE THICKNESS
OK, so now the first option is to allow for lines of different thickness by using the option:


   <hr size="N" />

Where N is how thick the line in pixels. Let's look at some examples to show the effect.

Example
<hr size="3" />


<hr size="8" />


<hr size="15" />

Google

Web
Eazy HTML

Site Stats

There are 5 users online
click to see where

149,242 total unique visitors
485,907 total pageviews
48 visitors in the last 24 hours
37 total visitors today
116 pageviews today
This page has been visited 3,846 times

get this script
Most users online at once:
63 on 01/18/2010

Valid CSS!

Valid XHTML 1.0!

LINE WIDTH
Anther formatting tag option for the <hr /> tag allows you to control the width of the line -- it doesn't have to stretch across the whole page. You can do this by using this format:


   <hr width="X" />
      
   <hr width="Y%" />

Now X is a number of pixels for the width and Y is a percentage of the current web page. In general, using the percentage is more recommended as it will self adjust itself to the width of the browser window used by the person reading your pages. Here are some examples:

Example
<hr width="80" size="3" />


<hr width="80%" size="3" />


LINE COLOUR
Anther formatting tag option for the <hr /> tag allows you to colour the line. You can do this by using this format:


   <hr color="XXXXX" />
Example
<hr color="red" width="50%" />


<hr color="#0066ff" width="50" />


LINE ALIGNMENT
You can also align your horizontal rules by using this format with either “right”, “center”, & “left”:

   <hr align="xxxxx" />
Example
<hr align="right" width="50%" />


<hr align="left" width="50%" />


<hr align="center" width="50%" />




INDEPENDENT PRACTISE
Experiment with some of the <hr /> options in your own web pages.

Top of page | Previous Lesson| Lessons Index | Next Lesson


Copyright © 2004 - EazyHTML.com