HTML LINE BREAK


  • An HTML Line Break produces a line break in a text. It is an empty element.
  • The <br /> element defines an HTML Line Break.
  • Look at the example below, to see how it works.

Example:

<html>

    <head>

        <title> Line Break </title>

    </head>

        <body> 

<!-- with a line break -->

I am a text.<br />

I am a text! <br />

I am another text.<br />

<!-- without a line break -->

I am another text.

I am a text!

I am another text.

         </body>

</html> 

Output:

I am a text.

I am a text!

I am another text.

I am another text. I am a text! I am another text.

    Even though the 4th to 6th sentences on the example above are in different lines on our code they still fall in one line because they don't have line breaks.