HTML Line Break

 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:

<!doctype html>
<html>
    <head>
        <title> HTML Line Break </title>
    </head>
    <body>
        <!--With a line break-->
        I am in a 1st line. <br />
        I am in a 2nd line. <br />
        I am in a 3rd line. <br />
        <br />
        <!--Without a line break-->
        I am in a 4th line.
        I am in a 5th line.
        I am in a 6th line.
    </body>
</html>

Output:

✔️Even though the 4th to 6th line on the example above are in different lines on our code they still fail in one line beacuse they don't have line breaks.

    
                                                                                

Post a Comment

Post a Comment (0)