[Index of Lessons]
[Lesson 2] [Lesson 4]

3. Paragraphs and Hard Rules

So far you have created and modified a HTML document, and now you should feel comfortable with the process of editing text and reloading it into your web browser.

We've seen earlier that a web browser will ignore all of the CARRIAGE RETURNS typed into your text editor. But, wherever a browser sees the paragraph tag, it inserts a blank line and starts a new paragraph. The HTML code for forcing a paragraph break is: <

<p>

Note that this tag is special in that it does not require an ending tag; you do not need to use:

</p>

In a later lesson we will see an instance where the <p> tag does use a closing </p> but for the majority of your web pages, it is not necessary.

Also note the header <h2> tags have a built in break so it is unnessary to put <p> tag before a header tag:

Other types of breaks

To separate major sections of a web page, use the hard rule or hr tag. This inserts a straight line like you see below this paragraph.
The HTML format for a hard rule tag is:
<hr>

The hard rule is a usefule separating tool, because it breaks the monotomy of a straight page. But one should never go over board in putting in the hard rule.
And finally, there is the <br> tag which forces text to a new line like the <p> tag, but without inserting a blank line. You might use this tag when making a list of items, when writing the lines of a poem, etc. Compare the differences between using the <br> and <p> in the below example:
Paragraph <;p>; and Line Break <;br>; tags
HTML Result
At first,one could not see<;br>; 
the brilliant purpose<;br>;
of the paragraph tag.
<;p>;
Moving on...
<;br>;
the more tags you write,<;br>; 
the better you get at it.
At first,one could not see
the brilliant purpose
of the paragraph tag.

Moving on...
the more tags you write,
the better you get at it.

Example
Okay, so now that you have seen them in action, let's use them for our web page. You have seen the <p> tag in use already, though now you understand what it does. What we'll do is add a few more headings, and some text underneath those, we'll probably add a hard rule to separate the sections.

<html>
<head>
<title>UFO's, Paranormal and other Mysteries</title>
</head>
<body text=black bgcolor=white link=red>
<h1>UFO's, Paranormal and other Mysteries</h1>
<p>
Welcome to my web site, this site is going to have various
pages pertaining to information I have read and have found very
interesting.<br>
Subject matter will range from UFO's to ghosts and
there specter friends, prophecy's and theories which will make
your mind query all that you know. <p>
All of the information contained within these pages can be found in full in the <b>X-Factor</b> magazine. For these pages only excerpts have been used. All pictures have been found on various web sites around the world.<p>
I hope you enjoy this site<p>
<hr>
<h1>UFO's</h1>
<h3>Area 51</h3>
"About 190km north west of Las Vegas, in the Nevada desert, the offical map stops. There is plenty there - roads, creeks, mountains, bunkers, buildings and a massive 9.5 km runway - but on paper these things do not exist. It is as if all human activity has ceased across an area the size of Switzerland."<p>
<h1>Paranormal</h1>
<h3>Millennium</h3>
"Michel de Nostradame, popularly known by his Latin name Nostradamus, often spent his evenings alone, gazing into a bowl of water - like a gypsy with a crystal ball - until he went into a deep trance and saw into the future. On one such night, Nostradamus witnessed his own death. He died two weeks later, on 2 July 1566 - the exact date he had predicted." <p>
</body>
</html>

Like before, add all of this to your first web page by opening the document and editing the page. To speed it up, you can cut and paste the code. After you have done all of this, click here (Example 3) to compare your work to the example provided. As you can see, the page still looks dull, this will change as you carry on. Though as you can see, it should be an interesting read.

Click on Lesson 4 to continue, or click here (Top) to return to the top of document

Hosted by www.Geocities.ws

1