Basic HTML Tutorial

BHP HTML Basics - My First Page


What does it look like in a web browser?
By viewing your HTML file in a web browser, you can get a preview of what the page will look like on the web. If you view the file that you created in the previous exercise by opening it from your web browser, you may be a bit disappointed that things look a bit plain and that the text does not look anything at all the way that you typed it in the HTML file. We'll fix that up right now.
You have probably noticed that the lines of text that you typed are all run together in one paragraph. That is because extra spaces and new lines are compressed together. You can fix that by adding a special tag to start a new paragraph. The tag to start a paragraph is <P>. Not a hard one to remember at all, P for paragraph. Although it is not strictly required, you can use the closing paragraph tag, </P> to mark the end of each paragraph.
Lets take another look at what happened to the text we added earlier. You may have typed out some nicely spaced lines like:
This will be my first web page.
I am making it with HTML.
So far it seems easy enough.
I can't wait to see it on the web.
And then you looked at your nice text and saw:
This will be my first web page. I am making it with HTML. So far it seems easy enough. I can't wait to see it on the web.
yuck!
But we can fix it right up by adding a <P> to start each new line. Make your code look something like:
<P>
This will be my first web page.
<P>
I am making it with HTML.
<P>
So far it seems easy enough.
<P>
I can't wait to see it on the web.
And then the web browser will display it like:

This will be my first web page.

I am making it with HTML.

So far it seems easy enough.

I can't wait to see it on the web.

Grab the Code
Review
Extra spaces and lines are ignored by the web browser. This can be used to your advantage to use some extra space around your code to make it easier to read and follow at times. This extra space is not displayed by the browser. To start a new paragraph in your text, you must use a <P> tag.
In the next page, we will look at another way to create a new line, using the tag for a line break, <BR>.
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