Check out example codes for "html horizontal line style". It will help you in understanding the concepts better.

Code Example 1

<h1>HTML</h1>

 <p>HTML is a language for describing web pages.....</p>


 <hr>

<h1>CSS</h1>

 <p>CSS defines how to display HTML elements.....</p>

Code Example 2

<!-- HTML -->

<!-- You can change the style of the horizontal line like this: --> 

<hr style="width:50%", size="3", color=black>  


<!-- Or like this: -->

<hr style="height:2px; width:50%; border-width:0; color:red; background-color:red">

Code Example 3

/* Red border */
hr.new1 {
  border-top: 1px solid red;
}

/* Dashed red border */
hr.new2 {
  border-top: 1px dashed red;
}

/* Dotted red border */
hr.new3 {
  border-top: 1px dotted red;
}

/* Thick red border */
hr.new4 {
  border: 1px solid red;
}

/* Large rounded green border */
hr.new5 {
  border: 10px solid green;
  border-radius: 5px;
}

Code Example 4

<h1>Horizontal Lines</h1>
<p>All you have to do is add this simple tag:</p>


<hr>


<p>Everything else in this example is not necessary.</p>

Code Example 5

var elem = document.createElement("hr");
elem.setAttribute("width", "100px");
document.body.appendChild(elem);

Code Example 6

<!-- code -->

<hr>

<!-- code -->

Learn ReactJs, React Native from akashmittal.com