Click to return to home page
Richard Lowe Jr Home

<P> and </P>

Description Attributes Examples Tips

Description:

Defines a paragraph of text. This is a container and you should include the closing </P> tag, although most browsers do not enforce this.

Attributes:

align=alignment

Determines how to align the paragraph. May have the following values:

CENTER Center the header
LEFT Align to the left
RIGHT Align to the right

class=class

Indicates that the paragraph is to be formatted using the specified class.

dir=direction

Indicates the direction (right or left) that the text is to be displayed. Useful for languages which display left to right.

event=JavaScript

When event occurs, execute the specified JavaScript.

id = "name"

You can give a paragraph a name, which allows it to be referenced and changed in a script (dynamic HTML).

lang="lang"

Indicates the language of the text within the paragraph.

style="style"

Defines the style in which the paragraph will be displayed. This overrides any style elements at an "outer" level, such as from the BODY or the Cascading Style Sheet.

title="title"

You can give a paragraph a title if you want. This provides some additional information about the paragraph. I'm not sure why you would want to do this, but you could.

 

Examples:

<P>A long time ago in a universe far, far away there existed a young man who changed the course of history.</P>

A long time ago in a universe far, far away there existed a young man who changed the course of history.

<P ALIGN=RIGHT>A long time ago...</P>

A long time ago...

Tips:

  1. Be sure and include the closing <P> so you do not have incompatibilities with any browsers.


Unless otherwise noted, all photos and text is Copyright © Richard G Lowe, Jr.