HTML Rules (Lines)

Create HTML Rules (Lines)

The <hr/> tag creates a horizontal rule (line) across the browser page. Rules are often used to separate sections of a document.


<!DOCTYPE HTML>
<html> 
<body> 
<p>The hr tag defines a horizontal rule:</p> 
<hr/> 
<p>This is a paragraph</p> 
<hr/> 
<p>This is a paragraph</p> 
<hr/> 
<p>This is a paragraph</p> 
</body> <!-- ww  w.j  a v a2s  . c  o  m-->
</html> 

Click to view the demo

The code above generates the following result.

HTML Rules (Lines)