Horizontal rules and <hr> extensions
Netscape provides several ways to control the attributes of horizontal rules.
Users of other browsers will usually see the rules, but will not see them with
the attributes you specify.
Thickness
You can change the thickness of horizontal rules by
specifying a pixel size for the line. A line with a size of 8 pixels is tagged like this:
<hr size=8>
and appears like this on your page:
Length
You can change the width of horizontal rules by specifying a width in pixels or
a percentage length so that the line is a certain percentage of the size of the
page. The default width of the line is the width of the page, resizing as the
page is resized.
If you specify a percentage for the width, the line will resize if the page is
resized. If you specify a width in pixels, the line will remain the specified
size, even if the page is more narrow than the line.
A line that takes up 50% of the page is tagged like this:
<hr width=50%>
and appears like this on your page:
A line 50 pixels long is tagged like this:
<hr width=50>
and appears like this on your page:
Alignment
Lines are centered by default, but you can specify the alignment by adding an
align=right or align=left attribute.
The tagging looks like this:
<hr width=50% align=right>
and appears like this on your page:
Return to the Advanced HTML tutorial