HTML p tag


A paragraph is marked up as follows:
<p>This is some text in a paragraph.</p>

Definition and Usage

The <p> tag defines a paragraph.
The p element automatically creates some space before and after itself. The space is automatically applied by the browser, or you can specify it in a style sheet.

Browser Support

The <p> tag is supported in all major browsers.

Differences Between HTML and XHTML

All "presentation attributes" of the p element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.

Optional Attributes

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
align left
Deprecated. Use styles instead.
Specifies the alignment of the text within a paragraph

Standard Attributes

id, class, title, style, dir, lang, xml:lang

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
HTML p tag Reviewed by 1000sourcecodes on 21:31 Rating: 5
Powered by Blogger.