HTML: Horizontal line styling

This entry is part 17 of 34 in the series HTML

The style attributes you can set for a horizontal line are align, width, size, color.

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

<h3>British Pop</h3>
<hr align='left' width='50%' size='10px' color='red'>
<h3>American Rock</h3>

</body>
</html>


Special Characters

In HTML 5, <hr> represents a thematic break in paragraphs.  We would normally use CSS to style a horizontal line in HTML 5.

Series Navigation<< HTML: Horizontal line
HTML: The 16 basic colors >>