LILLY ROBOT |
Horizontal rules can be use to divide sections of a document, so it looks more presentable.
The tag for the horizontal rule is <hr/> - it does not have an end tag.
<body>
<p>Section One</p> <hr/>
<p>Section Two</p> <hr/>
<p>Section Three</p> <hr/>
</body>
Displays
Section One
Section Two
Section Three
We can style are <hr/> with different colours and width sizes using the CSS property border.
Note: In HTML we have to type color instead of colour.
<body>
<p>Section One</p>
<hr style="border:2px solid green"/>
<p>Section Two</p>
<hr style="border:1px solid red"/>
<p>Section Three</p>
<hr style="border:3px solid blue"/>
</body>
Displays
One
Two
Three