The hr Element – HTML Horizontal Rule

Summary: A horizontal rule can be used to separate sections of your document or html page, and it is often accompanied by a divider symbol. The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or thematic break in an html page to divide or separate document sections. A new line will appear automatically when you enter the <hr> code into html, but this line does not require an end tag because it’s considered empty.

Table of Contents

HTML Divider?

The <hr> tag in HTML stands for horizontal rule and is used to insert a thematic break or division of document sections. The <hr> tag, which can be an empty one when no specific attributes are given (i.e., it does not need any end tags), creates the illusion that your readers have shifted their focus from within the page they were reading before to another part of the same page – instead of being positioned horizontally across all columns on the screen at once like browsing through different pages side-by-side inside a book with just about two lines per column using Unicode text characters without line breaks: “-” ~~ → · ← . To make this more engaging, we could say something along these lines: “<HR>” ~~ → · ← “This is the place where your readers might get lost if they do not see this new section of content ahead.”

<!DOCTYPE html>



<p>Normal horizontal line.</p>

        <!--HTML hr tag is used here-->

<p>Horizontal line with height of 30 pixels</p>

        <hr size="30">

<p>Horizontal line with height of 30 pixels and noshade.</p>

       <hr size="30" noshade> 


The Horizontal Rule: The element is used to separate content in a document or section. It has no effect on the presentation of text, and should only be used when logically needed within a paragraph. For example, if you are listing items that span multiple lines, use an hr between each item to break up the list into individual paragraphs. You may also find it useful for separating different topics from one another based on your CSS styling decisions.-If you want this line to have some background color applied as well, then add style=”background-color:#ff0000;” after the closing slash at the end of the tag – /hr/. If not set explicitly with stylesheet rules (such as display: block;) every rule will inherit.

Leave a Comment