HTML hr Tag (original) (raw)
Last Updated : 11 Jul, 2025
The ****
tag** in HTML is used to create a **horizontal rule **or line that visually separates content.
- It is a self-closing tag and does not require an end tag.
- It supports both Global Attributes and Event Attributes.
**Syntax:
Some Content.. ****
** Some Content..
HTML `
There is a horizontal rule below this paragraph.
This is a horizontal rule above this paragraph.
`
Attributes
The table below shows a few attributes that allow customization:
| Attribute Values | Value | Description |
|---|---|---|
| align | left center right | Used to specify the alignment of the horizontal rule. |
| noshade | noshade | Used to specify the bar without shading effect. |
| size | pixels | Used to specify the height of the horizontal rule. |
| width | pixels | Used to specify the width of the horizontal rule. |
Lets see how different hr tag attributes works together in example below:
HTML `
Normal horizontal line.
Horizontal line with height of 30 pixels
Horizontal line with height of 30 pixels and noshade.
`
**Output:
