content logo

Learn HTML:

Html p tag

The <p> tag defines a paragraph. The <p> element is the most commonly used block-level element. However, it cannot contain block-level elements (including <p> itself).

The following table summarizes the usages context and the version history of this tag.

  • As a logical element, empty paragraphs are ignored by the browsers, so do not use empty <p> elements to add blank lines in your web pages. To create blank lines use the <br> tag, or use the CSS margin property instead.

  • When you use the <p> element to begin a paragraph, it automatically creates some space (margin) above and below the content. This space is applied by the browser's built-in style sheets, but you can override it using CSS margin property.

The example below shows the <p> tag in action.

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


#HTML P Example #HTML P Code #HTML P Tutorial