VOOZH about

URL: https://www.geeksforgeeks.org/html/html-hr-tag/

⇱ HTML hr Tag - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML hr Tag

Last Updated : 11 Jul, 2025

The <hr> tag in HTML is used to create a horizontal ruleor line that visually separates content.

Syntax:

Some Content.. <hr> Some Content..

Attributes

The table below shows a few attributes that allow customization:

Attribute ValuesValueDescription
alignleft center rightUsed to specify the alignment of the horizontal rule.
noshadenoshadeUsed to specify the bar without shading effect.
sizepixelsUsed to specify the height of the horizontal rule.
widthpixelsUsed to specify the width of the horizontal rule.

Lets see how different hr tag attributes works together in example below:

Output:

👁 output
Comment
Article Tags: