Learn Scripting Languages from the Master!
To add a line break in a web page, you can use the <br> tag. Typing a <br> tag in your HTML code is similar to pressing the ENTER or RETURN key in a word processor. The effect of <br> tag is that the browser stops printing text on that line and drops down to the next line on that page. The <br> tag does not require a closing tag. The following shows an example:
Line breaks<br> in HTML
instructs the browser to start a new line after the word "breaks" because after this word the tag <br> is placed. Thus the output of the above code is:
To add multiple line breaks in a row, simply use the <br> tag for each line you want to stop and start. For instance,
Line breaks <br><br><br> in HTML
inserts three line breaks after the word "breaks". The following shows the output of the above code: