<hr> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:hr

Introduction

The hr element represents a paragraph-level break.

The hr element represented a horizontal line across the page.

The hr Element summary

Item Value
Element hr
Local AttributesNone
ContentsNone
Tag Style Void element
New in HTML5No
Changes in HTML5 The following local attributes are obsolete in HTML5: align, width, noshade, size, color.

Style Convention

hr {
   display: block;
   margin-before: 0.5em;
   margin-after: 0.5em;
   margin-start: auto;
   margin-end: auto;
   border-style: inset;
   border-width: 1px;
}

Using the hr Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <p>I like CSS and HTML. </p> 
      <hr> 
      <p>I like CSS and HTML. </p> 
      <hr> 
      <p>I like CSS and HTML. </p> 
      <hr>  
   </body><!--  w  w w.j a  v a2  s .co m-->
</html>

Related Tutorials