Warning:
This wiki has been archived and is now read-only.

Elements/p

From HTML Wiki
Jump to: navigation, search

<p>

The <p> element represents a paragraph.

Point

  • The p element should not be used when a more specific element is more appropriate. [Example B]


HTML Attributes

See global attributes.


Examples

Example A

[try it]

<p>The quick brown fox jumps over the lazy dog.</p>

Example B

The following example is technically correct

<section>
  <p>Last modified: 2001-04-23</p>
  <p>Author: fred@example.com</p>
</section>

However, it would be better marked-up as:

<section>
  <footer>Last modified: 2001-04-23</footer>
  <address>Author: fred@example.com</address>
</section>

Or:

<section>
  <footer>
    <p>Last modified: 2001-04-23</p>
    <address>Author: fred@example.com</address>
  </footer>
</section>


HTML Reference

The HTML5 specification defines the <p> element in 4.5.1 The p element.