Hr

<HR> </HR>

The HR tag is used to draw horizontal rules across the screen. If the margins are smaller at the time (this could be caused by images which are placed against the margins), the rule will extend to these margins instead of the entire window. A horizontal rule is most commonly used to separate sections within a document. You can specify the thickness of the line using the SIZE attribute, which uses a number of pixels. The width of the rule can be specified in number of pixels or as a percentage of the currently available window width, this is done using the WIDTH attribute. Percentage values must be within quotes. The NOSHADE attribute is used to indicate that the line should not have the usual shaded appearance, but instead be formed as a thick line. Setting an absolute width might not be the greatest idea, since you cannot tell how wide the currently available window will be, so you should use a percentage if you have to change the width of the rule.

Following are several examples of the HR tag.

This is a sample code that could be used to make a rule, followed by the result of the code.

<hr size=4 width="100%">


The size can be from 1-10, and the width can be 0-100%.

Another attribute of the HR tag is NOSHADE. This is an example of a tag with the NOSHADE attribute.

<hr noshade size=4 width="100%">


The HR lines can also be aligned to the left, right, or center, by adding a simple bit of text.

<hr align=left size=4 width="100%">


The left can be replaced by right or center, and the results will change accordingly.

<Size=1 Width="10%">


<Size=2 Width="20%">


<Size=3 Width="30%">


<Size=4 Width="40%">


<Size=5 Width="50%">


<Size=6 Width="60%">


<Size=7 Width="70%">


<Size=8 Width="80%">


<Size=9 Width="90%"


<Size=10 Width="100%">