Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 412857 of <p>

  • Raccourci de la révision : Web/HTML/Element/p
  • Titre de la révision : p
  • ID de la révision : 412857
  • Créé :
  • Créateur : SphinxKnight
  • Version actuelle ? Non
  • Commentaire

Contenu de la révision

Résumé

L'élément HTML <p> (pour Paragraph) représente un paragraphe de texte.

  • Catégories de contenu Contenu de flux, contenu palpable {{todo}}
  • Contenu autorisé Contenu phrasé.
  • Omission de balises {{no_tag_omission}}
  • Éléments parents autorisés Tout élément acceptant du contenu intégré.
  • Interface DOM {{domxref("HTMLParagraphElement")}}

Attributs

Cet élément dispose des attributs globaux.

En {{HTMLVersionInline(5)}}, l'attribut align de l'élément <p> est {{obsolete_inline}}.

Exemple

<p>Premier paragraphe du texte. J'aime les licornes beaucoup
   beaucoup beaucoup</p>

<p>Deuxième paragraphe du texte. Et si j'en avais une apprivoisée
   je serais très contente.</p>

Le fragment de code HTML ci-dessus produira :

Premier paragraphe du texte. J'aime les licornes beaucoup beaucoup beaucoup

Deuxième paragraphe du texte. Et si j'en avais une apprivoisée je serais très contente.

Note

Afin de changer l'espace entre les paragraphes il faut utiliser la propriété CSS margin. Il ne faut pas utiliser d'éléments {{HTMLElement("br")}} pour ajouter des espaces !

Spécifications

Spécification Statut Commentaires
{{SpecName('HTML WHATWG', 'grouping-content.html#the-p-element', '<p>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'the-p-element.html#the-p-element', '<p>')}} {{Spec2('HTML5 W3C')}}  
{{SpecName('HTML4.01', 'text.html#h-9.3.1', '<p>')}} {{Spec2('HTML4.01')}}  

Compatibilité des navigateurs

{{CompatibilityTable}}

Fonctionnalité Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Support simple 1.0 {{CompatGeckoDesktop("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Fonctionnalité Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Support simple {{CompatVersionUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

Voir aussi

  • {{HTMLElement("hr")}}
  • {{HTMLElement("br")}}
{{HTML:Element_Navigation}}

 

Source de la révision

<h2 id="Summary">Résumé</h2>
<p>L'élément <strong>HTML <code>&lt;p&gt;</code>&nbsp;</strong><em>(</em>pour <em>Paragraph)</em> représente un paragraphe de texte.</p>
<ul class="htmlelt">
  <li><dfn><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">Catégories de contenu </a></dfn><a href="/fr/docs/HTML/Cat%C3%A9gorie_de_contenu#Contenu_de_flux" title="https://developer.mozilla.org/fr/docs/HTML/Cat%C3%A9gorie_de_contenu#Contenu_de_flux">Contenu de flux</a>, contenu palpable {{todo}}</li>
  <li><dfn>Contenu autorisé </dfn><a href="/fr/docs/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9" title="/fr/docs/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9">Contenu phrasé</a>.</li>
  <li><dfn>Omission de balises </dfn> {{no_tag_omission}}</li>
  <li><dfn>Éléments parents autorisés </dfn> Tout élément acceptant du contenu intégré.</li>
  <li><dfn>Interface DOM </dfn> {{domxref("HTMLParagraphElement")}}</li>
</ul>
<h2 id="Attributes">Attributs</h2>
<p>Cet élément dispose des <a href="/fr/docs/HTML/Global_attributes" title="/fr/docs/HTML/Global_attributes">attributs globaux</a>.</p>
<p>En {{HTMLVersionInline(5)}}, l'attribut <strong>align</strong> de l'élément <code>&lt;p&gt;</code> est {{obsolete_inline}}.</p>
<h2 id="Example">Exemple</h2>
<pre class="brush: html">
&lt;p&gt;Premier paragraphe du texte. J'aime les licornes beaucoup
   beaucoup beaucoup&lt;/p&gt;

&lt;p&gt;Deuxième paragraphe du texte. Et si j'en avais une apprivoisée
   je serais très contente.&lt;/p&gt;
</pre>
<p>Le fragment de code HTML ci-dessus produira :</p>
<p>Premier paragraphe du texte. J'aime les licornes beaucoup beaucoup beaucoup</p>
<p>Deuxième paragraphe du texte. Et si j'en avais une apprivoisée je serais très contente.</p>
<h2 id="Notes">Note</h2>
<p>Afin de changer l'espace entre les paragraphes il faut utiliser la propriété CSS <a href="https://developer.mozilla.org/en-US/docs/CSS/margin" title="CSS/margin">margin</a>. <strong>Il ne faut pas utiliser </strong>d'éléments<code> </code>{{HTMLElement("br")}} pour ajouter des espaces !</p>
<h2 id="Specifications" name="Specifications">Spécifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Spécification</th>
      <th scope="col">Statut</th>
      <th scope="col">Commentaires</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('HTML WHATWG', 'grouping-content.html#the-p-element', '&lt;p&gt;')}}</td>
      <td>{{Spec2('HTML WHATWG')}}</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{SpecName('HTML5 W3C', 'the-p-element.html#the-p-element', '&lt;p&gt;')}}</td>
      <td>{{Spec2('HTML5 W3C')}}</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{SpecName('HTML4.01', 'text.html#h-9.3.1', '&lt;p&gt;')}}</td>
      <td>{{Spec2('HTML4.01')}}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilité des navigateurs</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Fonctionnalité</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Support simple</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1.0")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Fonctionnalité</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Support simple</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoMobile("1.0")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">Voir aussi</h2>
<ul>
  <li>{{HTMLElement("hr")}}</li>
  <li>{{HTMLElement("br")}}</li>
</ul>
<div>
  {{HTML:Element_Navigation}}</div>
<p>&nbsp;</p>
Revenir à cette révision