<P>NN all IE all HTML all  

<P>...</P>

HTML End Tag: Optional  

A p element defines a paragraph structural element in a document. With HTML 4, the p element is formally a block-level element, which means that content for a p element begins on its own line, and content following the p element starts on its own line. No other block-level elements may be nested inside a p element. If you omit the end tag (not permissible in XHTML), the element ends at the next block-level element start tag.

The nature of the p element has changed over time. In early implementations of HTML, the element represented only a paragraph break (a new line with some extra line spacing). Version 4 and later browsers render p elements in a hybrid way such that the start tag of a p element inserts a line space before the block. This means that a p element cannot start at the very top of a page unless it is positioned via CSS. Use the p element for structural purposes, rather than formatting purposes.

The content of a p element does not recognize extra whitespace that appears in the source code. Other elements, such as pre, render content just as it is formatted in the source code.

 
Example
 
<P>This is a simple, one-sentence paragraph.</P>
<P>This second paragraph starts on its own line, with a little extra
line spacing.</P>
 
Object Model Reference
 
[window.]document.getElementById(elementID)
 
Element-Specific Attributes
 
align
 
Element-Specific Event Handler Attributes

None.

alignNN all IE all HTML 3.2  

align="where"

Optional  

Determines how the paragraph text is justified within the box that the p element occupies. See the discussion about horizontal alignment for a block element's content in Section 8.1.5 earlier in this chapter.

The align attribute is deprecated in HTML 4 in favor of the text-align style sheet attribute.

 
Example
 
<P align="center">...</P>
 
Value

Text alignment values are center | justify | left| right, although the justify value does not validate in strict HTML or XHTML DTDs.

 
Default

left

 
Object Model Reference
 
[window.]document.getElementById(elementID).align   
langNN 3 IE 4 HTML 4  

lang="languageCode"

Optional  

The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.

 
Example
 
<SPAN lang="de">Deutsche Bundesbahn</SPAN>
 
Value

Case-insensitive language code.

 
Default

Browser default.

 
Object Model Reference
 
[window.]document.getElementById(elementID).lang