Learn HTML Code Tutorial Reference Guide

Attribute for <HR ...>
WIDTH = "width expression"

Usage Recommendation
use it, but don't rely on it

WIDTH sets the horizontal width of the rule. You can express the size in pixels or as a percentage.

These <HR ...>'s are set with pixel widths:

<HR WIDTH="50">
<HR WIDTH="100">
<HR WIDTH="300">

gives us




WIDTH is usually expressed as a percentage. If you use a percentage width, be sure to enclose the value in quotes.

<HR WIDTH="25%">
<HR WIDTH="50%">
<HR WIDTH="100%">

gives us




The default is 100%. By default the rule is centered. To set a different alignment use ALIGN.

Percentage widths use the percentage of the available width, not the full width of the page. For example, if the rule is in a table then the width is a percentage of the width of the table cell.

<TABLE BORDER> 
<TR>
<TD>Hey, whatever dude!
<HR WIDTH="50%">
A stitch in time saves nine
</TD>
</TR>
</TABLE

gives us

Hey, whatever dude!
A stitch in time saves nine
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial