Skip to content
Related Articles

Related Articles

Improve Article

HTML <br> Tag

  • Difficulty Level : Basic
  • Last Updated : 25 Jun, 2021

<BR> Tag

The browser does not recognize new line and paragraph formatting in the text. If you want to start a new line, you need to insert a line break with the help of of the <br>. The <br> tag insert a single carriage return or break in the document. This element has no end tag.

Let us consider an example. Type the following HTML code does not use the <BR> tag in notepad, save the document as an HTML file, and open it in a browser. You will notice that the text shows line breaks at four instances, the browser displays the entire text as a single paragraph.

Syntax: 

<br>

Attributes: This tag once accept an attribute called clear,

  • clear: Indicates where to begin the next line after the break.

Example: 



HTML




<!DOCTYPE html>
<html>
 
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>br Tag</h2>
         
        <!-- br tag is used here -->
         
<p>GeeksforGeeks: <br> Computer science portal</p>
 
    </body>
   
</html>                   

Output: 

Supported Browsers: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :