Problem Statement
Which tag creates a horizontal line to separate content?
Explanation
The hr tag creates a horizontal rule, which is a horizontal line used to separate content sections. The hr stands for horizontal rule. It is a self-closing tag and does not need a closing tag.
By default, it displays as a thin gray line across the page. The hr tag represents a thematic break or separation between paragraph-level elements. It is useful for separating different topics or sections in your content. You can style the hr tag using CSS to change its color, thickness, width, and style.
In modern web design, hr tags are often styled to match the overall design of the website.
Code Solution
SolutionRead Only
<h2>Section One</h2> <p>Content for section one</p> <hr> <h2>Section Two</h2> <p>Content for section two</p>
