Share via:

P - HTML Element

A description of the HTML p element


Edited: 2017-03-12 14:55

The p element represents a paragraph, usually containing one or more sentences. A new paragraph can be created when there is a natural change of subject. It can be a good idea to keep paragraphs short, to avoid walls of text, and increase readability. In other words: Write for the web, not for books!

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

The space between p elements, can be controlled with the CSS margin and padding properties.

<p>The happy cow was eating disgusting filthy grass from the ground, and it did not seem to mind at all. Chew, chew, chew.</p>
<p>I had never encountered such disgusting filthy grass before that day. It almost made me gag, right there on the spot.</p>

Paragraphs can typically be placed inside other block type elements and sectioning content such as div, article, header, footer, and others.

Do not place p's inside of inline type elements such as span, and a.


AttributesOther AttributesGlobal, I18n, Event


  1. p - HTML Standard -