The Key to

Paragraphs, Breaks,

and Copy and Paste


HTML Paragraph Breaks

Web browsers ignore all of the CARRIAGE RETURNS typed into your text editor. But, whenever a browser comes across the paragraph tag, it automatically inserts a blank line and starts a new paragraph. The HTML code for forcing a paragraph break is:

<p>

Note: This tag is special in that it does not require an ending tag; you do not need to use: </p> There are times where the <p> tag does use a closing </p> but for the majority of HTML coding, the </p> is not needed. Also note the <h> tags have a built in break so it is unnecessary to put <p> tag before a header tag:


Using Paragaph Breaks
  1. Open your text editor.
  2. First, type some sentences so that they are under the Introduction heading.
  3. After these sentences, add some more text. But rather than re-typing this in, from this web page try using your mouse to select and copy this sentence from this web page. "I am copying and pasting a sentence into my Web page. I will place a paragraph break between these two sentences.
  4. To accomplish this, your must have both your web browser and your text editor software open at athe same time.
  5. First, highlight the text from above that you wish to transfer to your web page.
  6. Next, go to edit and select "copy."
  7. Now, return to your HTML document in the text editor, chose edit again, and now paste this text after the existing sentences under the <h2>Introduction</h2> heading.
  8. Save the changes in the text editor and close the file.
  9. Return to your web browser and open your Web page by selecting Reload from the File menu. You should now see the new sentences of the Introduction. We now want to put a paragraph break between these sentences.
  10. Once again, return to your HTML document in the text editor.
  11. After the second sentence under <h2>Introduction</h2> (the one that ends "between these two sentences."), press RETURN (this is not necessary but it makes the HTML more readable to you as you work on it), and now enter the paragraph tag:
    <p>
  12. Save the changes in the text editor.
  13. Return to your web browser and Reload the document. The two sentences of the introduction should now be separate paragraphs.


Other Types of Breaks in Web Documents

For separating the major sections of a web page, the horizontal rule or <hr> tag is used. This inserts a straight line like you see right above the heading for this section. The horizontal rule tag does not come in a pair. No close tag is needed.

The HTML format for a horizontal rule tag is:

<hr>

A horizontal rule is the lines that you see separating the parts of this web page. You will notice one above "Other Types of Breaks in Web Documents" and "On Your Own."

Another tag used for separating text is the <br> tag. This tag forces text to a new line rather like like the <p> tag does, but it does not insert a blank line The <br> tag doesn't need a close tag either.


On Your Own

 

Try placing an <hr> tag above the Introduction heading in your web document. This will help to separate the opening sentence of the your document from the other portions that will follow.

Add some more sentences to your Web page and place a <br> tag in your Web page. Notice the difference. The <br> tag works rather like the return or enter key on the keyboard.

 

Lesson 4

Lesson Index


Alice Drive Middle School

Staff Information Index

This is a Palmetto State Roots Web Site.

 © 1998

Cynthia Ridgeway Parker, M.Ed.