Line Break in html pages using <br> tag
This is first Line
This is second line
Line breaks in html pages can be given by using <br> tag. It does not have any end tags and it can be used at any place within the body tags of the page.
Inside table cells and other simple areas also we can use line break tag <br>. More than one break tags can be used to give more line breaks. We will discuss here simple html line breaks and its uses.
The output is here
<pre> tag and line breaksWithin <pre> tags there is no need to give extra line breaks. The text will be displayed along with its line breaks.
In a text area if you are using any line breaks then it does not convert on its own to line breaks in html pages. As a result of this many time you will find posting by users or after the form is submitted the page get stretched horizontally without any line breaks. There are different ways to convert the line breaks in html pages, you can see php example of converting line breaks for html web pages.