COMPUTER LECTURES

HOME About us HTML ONLINE CODE EDITOR CONTACT US
HTML | HORIZONTAL RULE
The horizotal rule tag in HTML is used when you want to divide document sections.
Note: The horizontal rule tag has no ending tag.

SYNTAX

OPENING TAG CLOSING TAG
<hr>

Horizontal rule Tag in HTML

<hr>

Example : horizontal rule.html

<!DOCTYPE html>
<html>
<head>
<title>Computer lectures | Horizontal rule</title>
</head>
<body>
<hr width="10%" size="1">
<hr width="15%" size="2">
<hr width="20%" size="3">
<hr width="25%" size="4">
<hr width="30%" size="5">
<hr width="35%" size="6">
<hr width="40%" size="7" noshade>
<hr width="45%" size="8" noshade>
<hr width="50%" size="9" noshade>
<hr width="55%" size="10" noshade>
<hr width="60%" color="#006633" size="1">
<hr width="65%" color="#00ff66" size="2">
<hr width="70%" color="#330033" size="3">
<hr width="75%" color="#330099" size="4">
<hr width="80%" color="#3300ff" size="5">
<hr width="85%" color="#336600" size="6">
<hr width="90%" color="#660000" size="7">
<hr width="95%" color="#ff0000" size="8">
<hr width="100%" color="#ccff33" size="9">
</body>
</html>

The output on the web broswer

Horizontal rule