Login for Software or Support

CoffeeCup - HTML Editor, Flash & Web Design Software

Over 47,729,372 Downloads in 87 Countries

Tell a Friend About Our Cool Software

Buy the Book Here !

Chapter 2: Tags for Presenting Simple Text


Strictly speaking, text content in the body of an HTML document does not need to be enclosed in tags. Practically speaking, however, it always should be because using tags gives you the maximum control over how your Web page looks. There are two tags you need to know about when working with text. The <p> tag is used to define paragraphs. A paragraph is set apart from other text by a blank line. It's width depends on the size of the browser window, and will automatically wrap to fit (You can control the width of text by using tables, which we'll get to in Chapter 4).

To see how the <p> tag works, look at this HTML (I will omit the head section in this and other examples because it does not affect the rendering). Then, see how it is rendered in a browser in Figure 2.1.

<body>
<p>This is the first paragraph in the document. It is enclosed in
paragraph tags to set it apart from other text. Note that the text wraps automatically to fill the browser window. If the user changes the size of the browser window, the text adjusts too.</p>
<p>This is a second paragraph enclosed in its own set of paragraph tags. It is separated from the previous paragraph by a blank line.</p>
</body>

Figure 2-1. Use paragraph tags <p> to separate document text into paragraphs.


Table of Contents
CoffeeCup Home Page | Software | Copyright & Legal | Site Map | © 1996 - 2008 CoffeeCup Software, Inc.