Netscape's first HTML "extensions" (or "deviations form standards") offered some more formatting options for the <hr> tag (Horizontal Rule) -- see lesson 4). By default, the Netscape browser displayed the solid line separator with a three-dimensional, shaded look rather then the solid line as implemented in previous web browsers.
The first option is to allow for lines of different thicknesses by using the option:
<hr size=N>
where N is the thickness of the line in pixels. Let's look at some examples to show the effect.
<hr size=2> same as <hr> :
<hr size=8> : <hr size=20> : |
Anther formatting option for the <hr> tag allows you to adjust the width of the line -- it does not necessarily have to stretch across the whole page. You can do this by using this format:
<hr width=X> <hr width=Z%>
where X is a number of pixels for the width and Z is the percentage of the current web page. In general we recommend using the percentage as it will adjust itself to the width of the browser window used by the person reading your pages (some out there are using 2-page high resolution monitors while others are squinting into their 13" screen).
Here are some examples (see how we include the size tag as well):
<hr width=80 size=10> :
<hr width=80% size=10> : |
NOTE: Try stretching and/or shrinking the width of your web browser window to see the difference between specifying the width in absolute pixels (width=80) compared to specifying the width in percentage of the web page (width=80%)
<hr width=40% size=10> : <hr width=5% size=10> : |
Finally, there may be a case where you do not want the 3D shading on the <hr> tag. It is as simple as:
<hr width=60% size=6 noshade> :
<hr width=60% size=1 noshade> : |