p

< html‎ | elements
Jump to: navigation, search

p

This article is In Progress.


W3C Recommendation

Summary

The p (for paragraph) element (<p>) represents a paragraph.


Overview Table

DOM Interface HTMLParagraphElement

p cannot contain block-level elements (including p itself).

HTML information

Closing Tag optional
CSS Display block

Examples

This example uses the p element to create a paragraph.

HTML

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



Related specifications

Specification Status Related Changes
HTML 4.01 Specification W3C Recommendation
HTML5 W3C Working Draft The align attribute is obsolete.

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic Support 1
1
1
1
1

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic Support 1
Supported (when?)
18
1
6
8
1
1


Compatibility notes

Browser Version Note
Internet Explorer 8 The element is automatically closed when a TABLE element is encountered. For example, <p><table>..</table></p> is now parsed as <p>..</p><table>..</table>.
Android Browser When placed within a div element, this element might not expand to the full width of its containing element. Setting a background (a non transparent color or any background image) using CSS fixes the issue.

See also

Related articles

Document Structure










  • p


HTML


















































… further results

Attribution

This article contains content originally from external sources.

Portions of this content come from the Mozilla Developer Network cc-by-sa-small-wpd.svg: Article

Portions of this content come from the Microsoft Developer Network: Windows Internet Explorer API reference Article