The <br> tag

  • The <br> tag in HTML is used to insert a single line break. This means that any text following the <br> tag will start on the next line. It's like hitting the "Enter" key while typing to move to a new line.
  • HTML br element requires start tag only.
  • It can resie within inline as well as block level element.
  • The <br> tag is an empty tag which means that it has no end tag.
<p>BR stands for Breake Line Element<p>
<br>
<p>This is Example of <br></p>

Output Of <br> tag

BR stands for Breake Line Element

This is Example of <br>

The <hr> tag

  • The <hr> tag is used to insert a horizontal line, It can help break up sections of your content.
  • Purpose: The <hr> tag is great for separating different sections of your document, especially when there's a shift in topic.
  • Self-closing: The <hr> tag is self-closing, so you don't need an end tag.
  • Block-level element: It acts as a block-level element, meaning it moves any content that comes after it to the next line.
  • In short, if you need a simple way to create a horizontal line to divide your content, use the <hr> tag.
<p>HR stands for Horizontal Line<p>
<hr>
<p>This is Example of <hr></p>

Output Of <hr> tag

HR stands for Horizontal Line


This is Example of <hr>