aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/html/element/span
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/html/element/span')
-rw-r--r--files/fr/web/html/element/span/index.md160
1 files changed, 86 insertions, 74 deletions
diff --git a/files/fr/web/html/element/span/index.md b/files/fr/web/html/element/span/index.md
index da8b897455..9f0c24e946 100644
--- a/files/fr/web/html/element/span/index.md
+++ b/files/fr/web/html/element/span/index.md
@@ -8,98 +8,110 @@ tags:
- Web
translation_of: Web/HTML/Element/span
---
-<div>{{HTMLRef}}</div>
+{{HTMLRef}}
-<p>L'élément HTML <strong><code>&lt;span&gt;</code></strong> est un conteneur générique en ligne (<em>inline</em>) pour les contenus phrasés. Il ne représente rien de particulier. Il peut être utilisé pour grouper des éléments afin de les mettre en forme (grâce aux attributs {{htmlattrxref("class")}} ou {{htmlattrxref("id")}} et aux règles <a href="/fr/docs/Web/CSS">CSS</a>) ou parce qu'ils partagent certaines valeurs d'attribut comme {{htmlattrxref("lang")}}. Il doit uniquement être utilisé lorsqu'aucun autre élément sémantique n'est approprié. <code>&lt;span&gt;</code> est très proche de l'élément {{HTMLElement("div")}}, mais l'élément <code>&lt;div&gt;</code> est <a href="/fr/docs/Web/HTML/Éléments_en_bloc">un élément de bloc</a>, alors que <code>&lt;span&gt;</code> est <a href="/fr/docs/Web/HTML/Éléments_en_ligne">un élément en ligne</a>.</p>
+L'élément HTML **`<span>`** est un conteneur générique en ligne (_inline_) pour les contenus phrasés. Il ne représente rien de particulier. Il peut être utilisé pour grouper des éléments afin de les mettre en forme (grâce aux attributs {{htmlattrxref("class")}} ou {{htmlattrxref("id")}} et aux règles [CSS](/fr/docs/Web/CSS)) ou parce qu'ils partagent certaines valeurs d'attribut comme {{htmlattrxref("lang")}}. Il doit uniquement être utilisé lorsqu'aucun autre élément sémantique n'est approprié. `<span>` est très proche de l'élément {{HTMLElement("div")}}, mais l'élément `<div>` est [un élément de bloc](/fr/docs/Web/HTML/Éléments_en_bloc), alors que `<span>` est [un élément en ligne](/fr/docs/Web/HTML/Éléments_en_ligne).
-<div>{{EmbedInteractiveExample("pages/tabbed/span.html", "tabbed-shorter")}}</div>
+{{EmbedInteractiveExample("pages/tabbed/span.html", "tabbed-shorter")}}
-<h2 id="Attributs">Attributs</h2>
+## Attributs
-<p>Cet élément inclut uniquement <a href="/fr/docs/Web/HTML/Attributs_universels">les attributs universels</a>.</p>
+Cet élément inclut uniquement [les attributs universels](/fr/docs/Web/HTML/Attributs_universels).
-<h2 id="Exemples">Exemples</h2>
+## Exemples
-<h3 id="HTML">HTML</h3>
+### HTML
-<pre class="brush:html">&lt;p&gt;&lt;span&gt;Un peu de texte&lt;/span&gt;&lt;/p&gt;</pre>
+```html
+<p><span>Un peu de texte</span></p>
+```
-<h3 id="CSS">CSS</h3>
+### CSS
-<pre class="brush: css">p span {
+```css
+p span {
background: green;
-}</pre>
+}
+```
-<h3 id="Résultat">Résultat</h3>
+### Résultat
-<p>{{EmbedLiveSample("Exemples","100%","100")}}</p>
+{{EmbedLiveSample("Exemples","100%","100")}}
-<h2 id="Résumé_technique">Résumé technique</h2>
+## Résumé technique
<table class="properties">
- <tbody>
- <tr>
- <th scope="row"><dfn><a href="/fr/docs/Web/HTML/Catégorie_de_contenu">Catégories de contenu</a></dfn></th>
- <td><a href="/fr/docs/Web/HTML/Catégorie_de_contenu#Contenu_de_flux">Contenu de flux</a>, <a href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9">contenu phrasé</a>.</td>
- </tr>
- <tr>
- <th scope="row"><dfn>Contenu autorisé</dfn></th>
- <td><a href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9">Contenu phrasé</a>.</td>
- </tr>
- <tr>
- <th scope="row"><dfn>Omission de balises</dfn></th>
- <td>{{no_tag_omission}}</td>
- </tr>
- <tr>
- <th scope="row"><dfn>Parents autorisés</dfn></th>
- <td>Tout élément acceptant du <a href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9">contenu phrasé</a>, ou tout élément acceptant du <a href="/fr/docs/Web/HTML/Catégorie_de_contenu#Contenu_de_flux">contenu de flux</a>.</td>
- </tr>
- <tr>
- <th scope="row">Rôles ARIA autorisés</th>
- <td>Any</td>
- </tr>
- <tr>
- <th scope="row">Interface DOM</th>
- <td>{{domxref("HTMLSpanElement")}} (avant HTML 5, l'interface était {{domxref("HTMLElement")}})</td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <th scope="row">
+ <dfn
+ ><a href="/fr/docs/Web/HTML/Catégorie_de_contenu"
+ >Catégories de contenu</a
+ ></dfn
+ >
+ </th>
+ <td>
+ <a href="/fr/docs/Web/HTML/Catégorie_de_contenu#Contenu_de_flux"
+ >Contenu de flux</a
+ >,
+ <a
+ href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9"
+ >contenu phrasé</a
+ >.
+ </td>
+ </tr>
+ <tr>
+ <th scope="row"><dfn>Contenu autorisé</dfn></th>
+ <td>
+ <a
+ href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9"
+ >Contenu phrasé</a
+ >.
+ </td>
+ </tr>
+ <tr>
+ <th scope="row"><dfn>Omission de balises</dfn></th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row"><dfn>Parents autorisés</dfn></th>
+ <td>
+ Tout élément acceptant du
+ <a
+ href="/fr/docs/Web/HTML/Cat%C3%A9gorie_de_contenu#Contenu_phras.C3.A9"
+ >contenu phrasé</a
+ >, ou tout élément acceptant du
+ <a href="/fr/docs/Web/HTML/Catégorie_de_contenu#Contenu_de_flux"
+ >contenu de flux</a
+ >.
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Rôles ARIA autorisés</th>
+ <td>Any</td>
+ </tr>
+ <tr>
+ <th scope="row">Interface DOM</th>
+ <td>
+ {{domxref("HTMLSpanElement")}} (avant HTML 5, l'interface
+ était {{domxref("HTMLElement")}})
+ </td>
+ </tr>
+ </tbody>
</table>
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">État</th>
- <th scope="col">Commentaires</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
- <td>{{Spec2('HTML WHATWG')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
- <td>{{Spec2('HTML5 W3C')}}</td>
- <td>L'interface DOM est désormais {{domxref("HTMLSpanElement")}}.</td>
- </tr>
- <tr>
- <td>{{SpecName('HTML4.01', 'struct/global.html#edef-SPAN', '&lt;span&gt;')}}</td>
- <td>{{Spec2('HTML4.01')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
+## Spécifications
+
+| Spécification | État | Commentaires |
+| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | ----------------------------------------------------------------------- |
+| {{SpecName('HTML WHATWG', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}} | {{Spec2('HTML WHATWG')}} | |
+| {{SpecName('HTML5 W3C', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}} | {{Spec2('HTML5 W3C')}} | L'interface DOM est désormais {{domxref("HTMLSpanElement")}}. |
+| {{SpecName('HTML4.01', 'struct/global.html#edef-SPAN', '&lt;span&gt;')}} | {{Spec2('HTML4.01')}} | |
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+## Compatibilité des navigateurs
-<p>{{Compat("html.elements.span")}}</p>
+{{Compat("html.elements.span")}}
-<h2 id="Voir_aussi">Voir aussi</h2>
+## Voir aussi
-<ul>
- <li>{{HTMLElement("div")}}</li>
-</ul>
+- {{HTMLElement("div")}}