html hr style attributes code example
Example 1: how to style an hr tag
hr.new1 {
border-top: 1px solid red;
}
hr.new2 {
border-top: 1px dashed red;
}
hr.new3 {
border-top: 1px dotted red;
}
hr.new4 {
border: 1px solid red;
}
hr.new5 {
border: 10px solid green;
border-radius: 5px;
}
Example 2: which is right or in html
<hr> <!-- it represents a horizontal line break, in HTML4.0 we use <hr>,
in XHTML1.0 we use <hr/>, in HTML5(which is the current version of
HTML) we can use both <hr> and <hr/>
-->
Example 3: hr tag html
<hr> <!-- A horizontal line -->