12. How to insert a line break

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.

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

2. An introduction to coding web pages with XHTML

2. An introduction to coding web pages with XHTML In this series of tutorials, you will learn...

3. How is XHTML different from HTML?

3. How is XHTML different from HTML? If you watched the previous tutorial, you'll know that...

5. Some resources you should know about before you begin

5. Some resources you should know about before you begin Before we begin, you should know...

4. Choosing a text editor for web development

4. Choosing a text editor for web development In this tutorial, we will discuss the factors...

6. How to quickly open a local web page in your browser

6. How to quickly open a local web page in your browser They may seem obvious to some, but...