Newbie dot Org HomePage
Visit one of our web buddies

<p> Paragraph

This tag is used to indicate a new paragraph. There is a right and a wrong way to think about this tag. The right way to think about this tag is the <p> and the associated <p> define a block of text as a paragraph.

<p>This is a defined paragraph.</p>

The paragraph style happens to insert a blank line when rendered by a browser.

The incorrect way to think about the <p> paragraph tag is that it's a double <br>. I happen to use the paragraph tag thinking about it in the wrong fashion. I learned it that way and it works okay for me -- for the moment. Since you is just starting out in life as an HTML editor I suggest you learn it the correct way.

Here's an example of what I mean:

Example HTML Code Example HTML Code as it would be rendered
<html>
<title>Page title</title>
<body>
This is line one followed by a break.<br>
And here is line two. <br>
And a third final line.
</body>
</html>
This is line one followed by a break.
And here is line two.
And a third final line.

 
If I decide that I want to put a little white space between the lines two and three, I just replace the <br> break at the end of line two with a <p> paragraph tag. Like so:

This is line one followed by a break.<br>
And here is line two. <p>
And a third final line.
This is line one followed by a break.
And here is line two.

And a third final line.

 
That is not technically correct and later when I try using style sheets I'll have to redo my code. Here is the more correct action:

This is line one followed by a break.<br>
And here is line two.
<p>And a third final line.</p>
This is line one followed by a break.
And here is line two.

And a third final line.

 
The disadvantage of doing it the correct way is that the line which previously had a nice comfortable <br> at the end of the line just like a carriage return, end up being naked. It just doesn't fit my world-view. Hence I cling to the old format.

The advantage of doing it the correct way is that I can start using some cool and groovy justification attributes. Such at the following:

<p align="left">Left Justified</p>
<p align="left">Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "left" on word wrap.</p>
<p align="right">Right Justified</p>
<p align="right">Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "right" on word wrap.</p>
<p align="center">Center Justified</p>
<p align="center">Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "center" on word wrap.</p>
<p align="justify">Justify Justified</p>
<p align="justify">Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "justify" on word wrap.</p>

Left Justified

Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "left" on word wrap.

Right Justified

Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "right" on word wrap.

Center Justified

Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "center" on word wrap.

Justify Justified

Here is a small block of text, enough text to cause the sentences to wrap and illustrate the effect of "justify" on word wrap.

 
By the way, not all browsers will render the above text in the expected fashion. Especially something like "Justify". This is only rendered on Netscape 4 and MSIE 4.