Loading...
HTML <hr> Tag

HTML <hr> Tag

In this tutorial, we will learn about hr tag in HTML with the help of examples.


<hr> Tag

Hr tag <hr> is used to create a horizontal line.

Note : This is also known as Horizontal Rule in HTML.

Syntax

<hr />

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Hr Tag</title>
  </head>
  <body>
    <p>This is paragraph.</p><hr />
  </body>
</html>

Output

This is paragraph.



Specific Attribute

Attribute Value Description
align left
right
center
Specifies the alignment of the horizontal rule
noshade noshade It removes the usual shading effect that most browsers display
size pixels
percentage(%)
It specifies the height of the horizontal rule
width pixels
percentage(%)
Specifies the URL of a page or the name of the anchor we want to hyperlink the document

Global Attribute

Hr Tag support all the global attributes of HTML.


Event Attribute

Hr Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of hr tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML html Tag.

- Related Topics