HTML/Elements/p

From W3C Wiki
< HTML‎ | Elements
Revision as of 01:16, 1 February 2014 by Muchos (Talk | contribs)

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>

P01.png

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.