Horizontal line examples using only HTML attributes
The <hr> tag creates a horizontal line used to separate content. Earlier HTML versions allowed styling using attributes like color, width, size, and align.
Note: These attributes are old (deprecated), but useful for learning basic HTML.
<hr color="red"> <hr color="green"> <hr color="blue">
<hr color="blue" width="25%"> <hr color="red" width="50%"> <hr color="orange" width="75%">
<hr color="green" size="8"> <hr color="green" size="2"> <hr color="green" size="20">
<hr color="purple" width="40%" align="left"> <hr color="orange" width="40%" align="center"> <hr color="black" width="40%" align="right">
Left aligned:
Center aligned:
Right aligned: