Horizontal line in HTML

The <hr>tag is used for creating a Horizontal line. This is also called Horizontal rule in HTML.
We can change the line color, using color attribute.
We can change the default line size using size attribute.
We can change the default width using width attribute.

Example:

<!DOCTYPE html>
<html>
<head>
<title>Horizontal line in HTML</title>
</head>

<body>
Simple Line
<hr>
Line with changed color.
<hr color="blue">
Line with changed size.
<hr size="10px">
Line with changed width.
<hr width="50%">
Line with changed width, color, size.
<hr width="80%" color="green" size="10px">
</body>
</html>

Output of this code will look like this: