HTML Basix - HTML tutorials and online webmaster tools

Htaccess code generators Code generators Tutorials

Online and offline code generators

Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.
Introduction  1  2  3  4  5  6  7  8  9  10  Home

Lesson 5

How to space your lines apart...

If you type in a few sentences, you will find that hitting enter between your lines does absolutely nothing when you view your page in html. They just run into each other!! You need a tag to leave spaces between lines. The tag you use is "<br />".
If you put one "<br />" in, you are breaking your typing and continuing on the next line. If you put in "<br /><br />" you will find that you have actually got a space between the lines.

Another way to leave a space instead of typing in "<br /><br />" is to use the "<p>" tag. P for paragraph so you won't forget!!!

Type this into your notepad, using enter to seperate the lines:

This is a sentence I am typing
to see how to stop my lines
running on and on and on!

Save your notepad, then refresh your html page. You will see that even though you hit enter between the lines, they all run into each other.

Now type the same thing again, but put a "<br />" at the end of each line. Save your page, then refresh your html page to see the difference. Try the same thing with "<p>" to see the difference between the "<br />" and "<p>" tags.

NOTE : the closing p tag is - you guessed it!! "</p>"

Click here to see an example of "<br />" and "<p>" tags.

How to center your text...

This is pure and simply a case of typing "<center>" before the text you want centered. When you have finished the part you want centered, you need to close it with "</center>".

For example:

This is centered using the "center" tag.

You would type it out like this:
<center>This is centered using the "center" tag</center>

If you want to align your text to the right, you need to use the "p" tag.

For example:

This is aligned to the right using the "p align=right" tag.

You type this like:
<p align="right">This is aligned to the right using the "p align=right" tag.</P>

Anything between the opening tag and the closing tag is affected by the command, so if you want your whole page centered, or aligned right, you would put your "<center>" or "<p align="center">" tag before any text on the page, and put the closing tag after all the text on the page (but before the "</body>" tag, which is covered next..). This will also align your images along with the text as well.

How to finish off a webpage!!!!

After you've put in the 'body' of your page (any text or images you want displayed), you need to 'close' the page. Remember way back when you had a "<body>" and "<html>" tag? They need to be closed. After everything else on your page, you type in "</body>" then "</html>". As you 'opened' the html tag first, and the "<body>" tag was afterwards, then the 'body' is within the "<html>" tags. You need to 'close' the "<html>" tag last. Think of it as back-stepping your way out of it!!

What you need to type after you've finished putting in your text is:


That's the very basics of a webpage! Click here to see a sample of a page you should be able to build!!

I think you've got the hang of text...before we start adding pictures,
how about we get that page uploaded in lesson 6!

Introduction  1  2  3  4  5  6  7  8  9  10  Home

Site Stats     
failed to establish a db connectionfailed to establish a db connection
   You beaut

This site is © HTML Basix 2003 - 2009