HTML P Tag

How to use the P tags properly to markup text on a web page.

The p element in HTML is used for paragraphs of text.

Space Between Elements

Normally there will be margin between elements, this is controlled through the Margin and Padding Properties of CSS. It is recommended to read An Introduction to CSS, to understand how to use apply styles.

Attributes

Standard Attributes

Attribute:Value:Description:DTD:
AttrsOther AttributesCommon, I18n, EventSTF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Example:

<p>This is a line of text.</p>

Paragraphs goes in the body section, between the body tags. Beginners might want to read the Tutorial Entry: Paragraphs and Headings.

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.