HTML hr tag

<hr> tag represents a break where a new topic starts within a section in a book. It is also used at the location of a scene change in a story.

By default, this is a thick line along x-axis. hr tag is being used in the following example to represent a topic transition.

<section>
  <p>This is Topic 1 contained in the same section as the Topic 2. When this topic ends ,then we add horizontal role. This includes content centered on topic1.</p>
  
<hr>

  <p>This is new topic contained in the same section as the Topic 1. This new topic contains the content after the horizontal role.This is another block of content centered on a particular topic.</p>
</section>
</>

This is Topic 1 contained in the same section as the Topic 2. When this topic ends ,then we add horizontal role. This includes content centered on topic1.


This is new topic contained in the same section as the Topic 1. This new topic contains the content after the horizontal role.This is another block of content centered on a particular topic.

Tag omission

It is a self closing tag (<hr />). In other words, there is no end tag.

Global Attributes

All the global attributes are applicable on the br element.

Tip: Remember that hr should be used within a section and not between the two sections.



Was this article helpful?