4. Breaking it up into paragraphs
So far you have created and modified HTML documents, and you should
feel comfortable with the process of editing text and reloading it
into your web browser. So now relax for this fast lesson on
inserting paragraph breaks.
Objectives
After this lesson, you will be able to:
- Identify the paragraph break tag in HTML.
- Copy text from the web page and paste it in another document.
- Insert paragraph breaks into the text of your HTML document and
view the changes within your web browser.
Lesson
HTML Paragraph Breaks
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 have an ending tag;
you do not need to use:
</p>
Inserting Paragraph Breaks
Note: If you do not have the working document from the previous
lesson, download a copy now.
Follow the directions below to insert and view a paragraph break in
your HTML document.
- Re-open your workspace (if not already opened).
- Go to the text editor window.
- Open your working document,
Volc.htm
, in the text
editor (if not already opened).
- First we want to move the second and third sentences ("A volcano is
.....") so that they are under the Introduction heading.
Use the mouse to cut and paste this text in the proper location.
- After this sentence, we want to add another line. But rather than
re-typing this in, from this web page use your mouse to select and
copy the sentence:
Volcanoes have been a part of earth's history
long before humans. Compare the history of human
beings, a few million years in the making, to that of
the Earth, over four billion years in the making.
- Now, return to your HTML document in the text editor, and
paste this text after the first sentence under the
<h1>Introduction</h1> heading.
- Save the changes in the text editor.
- Return to your web browser.
- If your working document is not visible, Use the Open
Local... command from the File menu to open the document.
- Select Reload from the File menu. You should now
see the two sentences of the Introduction. We now want to put a
paragraph break between these sentences.
- Again, return to your HTML document in the text editor.
- After the first sentence under <h1>Introduction</h1>, press RETURN (not necessary but it
makes the HTML more readable), and then enter the paragraph
tag:
<p>
This section should now look like:
<h2>Introduction</h2>
A volcano is a location where magma,
or hot melted rock from within a planet, reaches the surface.
It may happen violently, in a massive supersonic explosion,
or more quietly, as a sticky, slow lava flow.
<p>
Volcanoes have been a part of earth's history long before
humans. Compare the history of human beings, a few million
years in the making, to that of the Earth, over four
billion years in the making.
- Save the changes in the text editor.
- Return to your web browser and Reload the document. The two
sentences of the introduction should now be separate paragraphs.
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 right above the heading for this section.
The HTML format for a hard rule tag is:
<hr>
As practice, put an hr tag above the
Introduction
heading. This will help to separate the
opening sentence of the lesson from the other portions that will
follow.
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 these two examples:
HTML | Result |
And then, we could all see
at once the brilliant purpose
of the paragraph tag.
<p>
Moving on...
<p>
the more tags you write, the better you
will feel?
|
And then, we could all see at once the brilliant purpose of the
paragraph tag.
Moving on...
the more tags you write, the better you will feel?
|
COMPARED TO |
And then, we could all see<br>
at once the brilliant purpose<br>
of the paragraph tag.
<p>
Moving on...
<br>
the more tags you write, the better you
will feel?
|
And then, we could all see
at once the brilliant purpose
of the paragraph tag.
Moving on...
the more tags you write, the better you will feel?
|
Check Your Work
If you would like, compare your web page to this sample. If your document was
different from the sample, review how you entered the paragraph
break, <p>, into the text editor. Make sure you entered it as
instructed in the Inserting Paragraph Breaks section of this
lesson.
Review Topics
- What is the HTML tag for a paragraph break?
- What steps did you use for inserting a paragraph break in your
document?
- How did you display and view the changes in your web browser?
- Extra Credit*- What is a hard rule <hr> tag? a <br> tag?
Independent Practice
Use the paragraph, the hard rule, or the br tags to create
paragraphs or sections in your own document.
Coming Next....
Do you remember your first font?
How about adding Style... to your text.
Writing HTML Lesson 4: Breaking it up into paragraphs
©1995
Maricopa Center for Learning and Instruction (MCLI)
Maricopa County Community College District, Arizona
The Internet Connection at MCLI is
Alan Levine --}
Comments to levine@maricopa.edu
URL: http://www.mcli.dist.maricopa.edu/tut/tut4.htm