HTML5 hr tag, Example of <hr> tag in html5


 

HTML5 hr tag, Example of <hr> tag in html5

In this illustration we will discuss about the <hr> tag in html5.

In this illustration we will discuss about the <hr> tag in html5.

HTML5 hr tag, Example of <hr> tag in html5

In this illustration we will discuss about the <hr> tag in html5. This tag is used to specify a horizontal rule in the section or document, For differentiating from other topic or section in the documnet. This tag is used when we required sapration between content of  the pages.

Declaration Syntax:

The syntax of hr tag is as follows:

<hr/>

Example:hr_tag.html.

<!DOCTYPE html>
<html>
  <head>
      <title>Example of hr Tag</title>
  </head>
  <body>
      <h1>Java Devlopment IDE</h1>
    <abbr title="This is horizontal rule"><hr></abbr>
    <h2>My Ecllipse</h2><hr>
    <h2>Net Beans</h2>
    </body> 
</html>

Output:

Download This Example:

Difference between HTML5 and HTML4

In the html4 hr tag is used to just display the horizontal line, But in html5  this tag is used as a paragraph level theamatic break. The attributes like width, align, noshade, size color are replaced from html5 and used css instead of it .

Ads