By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more


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

Edited: 2015-12-04 09:32

The p element in HTML is used to represent text, each p element creates a new block of text, typically separated by a single line break.

Each new line of text should be represented in its own paragraph, rather than using br to force linebreaks this should allow for text to flow naturally. There are cases where its fine to use br elements, but for main article content you should generally avoid it.

Normally there will be small margin (linebreak/space) between elements, this can be controlled through the Margin and Padding Properties of CSS.


Standard Attributes

AttrsOther AttributesCommon, I18n, EventSTF

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

HTML Paragraph Example:

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

Paragraphs can typically be placed inside other block type elements.