HTML: Horizontal line

This entry is part 16 of 34 in the series HTML

Horizontal line is useful as a divider between sections of a webpage.

To add a horizontal line, simply add the following one-sided tag where you want the line to appear.

<hr>

By default, the line runs the entire width of the browser windows, is two pixels in height, and is black with a chiseled effect.

You can change these characteristics by applying attributes within the tag.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Horizontal Line</title>
</head>
<body>

<h3>British Pop</h3>
<hr>
<h3>American Rock</h3>

</body>
</html>
Horizontal Line

Series Navigation<< HTML: Special characters or entities
HTML: Horizontal line styling >>