Horizontal rules

You can use horizontal rules <hr> to divide your document into parts. Example:

Some text...
Some more text below.
HTML code:

Some text...<hr>
Some more text below.

Horizontal rules can be in different sizes:







HTML code:

<hr size=3>
<hr size=6>
<hr size=12>
<hr size=36>
<hr size=72>

You can change between 3D and 2D shape using noshade attribute




HTML code:

<hr size=24>
<hr size=24 noshade>

You can change width of the rules with width attribute


You can specify width in pixels:


HTML code:
<hr width=50>
<hr width=10>
<hr width=300>
You can also use percents:



HTML code:
<hr width="25%">
<hr width="50%">
<hr width="75%">

Changing alignment of the rules with align attribute

Align attribute can have three values: left, center, right. Examples:



HTML code:
<hr width="33%" align=right>
<hr width="33%" align=center>
<hr width="33%" align=left>

Changing color with color attribute




HTML code:
<hr size=6 color="#FF0000">
<hr size=6 color="#00FF00">
<hr size=6 color="#0000FF">


Back



Back to main page