html
  1. html-hr-tag

HTML <hr> Tag

The <hr> tag represents a thematic break between paragraphs or sections of content. It is a self-closing tag.

Syntax

<hr>

Example

<p>This is the first paragraph.</p>
<hr>
<p>This is the second paragraph.</p>
Try Playground

Explanation

The <hr> tag creates a line that spans the entire width of the container it is placed in. The line is typically represented as a horizontal rule.

Use

The <hr> tag is useful for visually separating content on a page. It is commonly used to divide sections of content or to break up a large block of text. It can also be used as a decorative element.

Important Points

  • The <hr> tag does not require a closing tag
  • It is recommended to use CSS to style the <hr> tag to match the design of your website
  • The thickness, color, and width of the line can be customized using CSS

Summary

  • The <hr> tag represents a thematic break between paragraphs or sections of content
  • It is a self-closing tag and does not require a closing tag
  • The <hr> tag can be used to visually separate content on a page
  • It is recommended to use CSS to style the tag to match the design of your website.
Published on: