1.0 KiB
1.0 KiB
title |
---|
Create a Horizontal Line Using the hr Element |
Create a Horizontal Line Using the hr Element
The hr
tag is one of the simplest HTML elements. It creates a thin horizontal line line across its parent element.
This lesson uses the hr
tag to separate the title and content of a "card". So how do you create an hr
element?
<!-- It's this easy -->
<hr>
This element is self-closing, but to be friendly to parsers and style checkers you should add an explicit closing marker.
<hr />
Whichever format you choose it will create a horizontal line as in this lesson on freeCodeCamp. Here is a screenshot from that lesson showing an hr
element contained within a div.