How to Break a line in HTML

In this article I will explain the concept of linebreak in HTML.
  • 2259

Line Breaks


We can break the line by using <br> tag,For example.A <br> tag is empty tag which means it does not contain end tag with it.A break tag work as enter key on the keyboard.it breaks the line and and put the cursor to the next line.

 

<html>

<head>

    <title>HTML Example</title>

</head>

<body>

    <p>

        A computer is a general purpose device<br />

        which can be programmed to carry out a

        <br />

        finite set of

        <br />

        arithmetic or logical operations.</p>

</body>

</html>

 

Output

A computer is a general purpose device
which can be programmed to carry out a
finite set of
arithmetic or logical operations.


One more example here is as follows:


<html>
<head>
    <title></title>
</head>
<body>
    It is<br />
    <br />
    <br />
    Break tag.
</body>
</html>

Output:

It is

Break tag.


In this ouput after is three break tag has been put.As a result it will break the sentence  break tag line three times .

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.