HELP - Lesson 2 Page 4

Positioning

HTML Tags are used for positioning as well as formatting your text. The most common problem is to divide your text into new lines or paragraphs.

Line Break

Adding a line break is as simple as including the tag <br> at the point where you want to force a new line of text.

Note - this tag does not require a corresponding closing tag as it does not actually contain any text. All rules are of course designed to be broken, but you can in fact place a closing tag if you want to comply with the very latest xhtml standards, to comply with xml and wml (wap) rules. That is up to you as it will in no way affect the HTML page which you are constructing.

Try this now - add a line break after one of your sample elements, and take care not to place it inside any existing element, so in our previous example place it between the closing tag of the first word and the opening tag of the second word.

In actual fact there is a better way than the Line Break tag to divide text - and that is the use of paragraph markers.

Paragraphs

Try to get into the habit of using the <P> to mark the beginning of a paragraph, rather than using the <br> tag, as this gives much more control over the document.

Tip : A <P> does not strictly require a closing tag, but use one anyway. It helps to break the document up.

Horizontal Rule

Try the <hr> tag to split the page with a visible horizontal line. Very useful.

Another important principal has been reached. All elements have a start and and end. Take care not to split them accidentally, or the results may be very unpredictable.

You should now be able to break words into distinct paragraphs, and add horizontal lines to help to divide the document up.

Your web page should be looking better than ever now and at last it should be shaping up into a web page instead of a random line of words.

Now make sure you know how to save it!...

[ Back ] | [ Next ]