Tutorialspoint.dev

HTML | br Tag

The <br> tag in HTML is used to give the single line break. It is the empty tag so it does not contain end tag.

Syntax:

<br>

Example:

<!DOCTYPE html>
<html>
    <head>
        <title>br Tag</title>
        <style>
            body {
                text-align:center;
            }
            h1 {
                color:green;
            }
        </style>
    </head>
    <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: The browser supported by <br> tag are listed below:

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


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter