Basic HTML Tutorial

BHP HTML Basics - Line Breaks


Making a New Line
Although the <P> tag will move your text to a new line, it places what looks like a "double-space" between the lines.
Sometimes this is not exactly the effect that you want for your web page. HTML gives you another way to start a new line directly below the previous one. You can do this with the <BR> tag. Like the <P> tag, this tag has a hint of what it does in its name. It makes a line BReak.
If you place some lines of text in your HTML file using both of these tags the difference in presentation will clearly be seen.
Change the code in your file to look something like:

<P>
This will be my first line of text.
<P>
I am making the second line with a paragraph tag before it.
<P>
This is my third line, I will use a line break tag after it..
<BR>
and my fourth line will be much closer.
Then the browser will display something like:

This will be my first line of text.

I am making the second line with a paragraph tag before it.

This is my third line, I will use a line break tag after it..
and my fourth line will be much closer.

Grab the Code
Review
We have seen how a HTML file is made up of two sections, a <HEAD> and a <BODY>.

We have learned that the content of the <BODY> section is what is displayed in the web browser.

We have also learned two ways to start a new line of text, by using a <P> tag and a <BR> tag.

In the next section, we will see how to increase the capabilities of tags by adding attributes.
Back Next
[Back] [Table of Contents] [Next]
Copyright 2000 John H. Bolgiano, Jr. - All rights reserved
Modified with permission for educational use by Roberta Bush