Let us say that there is a requirement where you are asked to print a small story in HTML with line breaks.
Let us try writing it and see if it works.
<html> <body> In a huge pond, there lived many fish. They were arrogant and never listened to anyone. </body> </html>
So, if you look at the above output, the story got printed in a single line without line breaks.
That's not what we wanted.
And this is where the <br> tag comes into picture.
So, let us rewrite the above example with <br> tag and see if that works.
<html> <body> In a huge pond, <br> there lived many fish. <br> They were arrogant and <br> never listened to anyone. <br> </body> </html>
Now, if you look at the above output, the story got printed with proper line breaks.
And all we have done is, at the end of each line we have placed the <br> tag.
In a huge pond, <br> there lived many fish. <br> They were arrogant and <br> never listened to anyone. <br>
Line breaks can also be inserted using <p> element.
The <p> element also inserts two line breaks.
Let us rewrite the above example with <p> element.
<html> <body> <p> In a huge pond, </p> <p> there lived many fish. </p> <p> They were arrogant and </p> <p> never listened to anyone. </p> </body> </html>
So, if you look at the above output, two line breaks for each line.
Once again, let us rewrite the above example using the <div> element. The <div> element inserts one line break for each line.
<html> <body> <div> In a huge pond, </div> <div> there lived many fish. </div> <div> They were arrogant and </div> <div> never listened to anyone. </div> </body> </html>
So, in the above output, the <div> element inserted one line break for each line.