Intro to XHTML series

12. How to insert a line break

In any HTML document, line breaks will not automatically appear in a block of text.

For example, if we split this first sentence up, one word per line...

...then save and view the page in our browser...

...the sentence appears unchanged.

To put line breaks in your text, you must manually do so using the <br /> tag.

1) We'll put these two sentences on separate lines.

Be sure to always put a slash / before the closing bracket >.

2) Save, and let's view the page again in our browser.

Here's what it looked like before. Now refresh.

It worked! The two sentences are now on two lines.

This tutorial is now complete. You now know how to insert a line break using XHTML.