aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/html/element/data/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/html/element/data/index.html')
-rw-r--r--files/fr/web/html/element/data/index.html118
1 files changed, 48 insertions, 70 deletions
diff --git a/files/fr/web/html/element/data/index.html b/files/fr/web/html/element/data/index.html
index 83c25b0833..921d4205ff 100644
--- a/files/fr/web/html/element/data/index.html
+++ b/files/fr/web/html/element/data/index.html
@@ -1,37 +1,68 @@
---
-title: <data>
+title: "<data> : l'élément de données"
slug: Web/HTML/Element/data
tags:
- Element
- HTML
+ - HTML text-level semantics
- Reference
- Web
translation_of: Web/HTML/Element/data
+browser-compat: html.elements.data
---
<div>{{HTMLRef}}</div>
-<p>L'élément <strong>HTML <code>&lt;data&gt;</code> </strong>relie un contenu à une version de ce contenu interprétable par un ordinateur. Si le contenu possède une composante temporelle, l'élément {{HTMLElement("time")}} doit être utiisé.</p>
+<p>L'élément HTML <strong><code>&lt;data&gt;</code></strong> relie un contenu à une version de ce contenu interprétable par un ordinateur. Si le contenu possède une composante temporelle, l'élément <a href="/fr/docs/Web/HTML/Element/time"><code>&lt;time&gt;</code></a> doit être utilisé.</p>
<div>{{EmbedInteractiveExample("pages/tabbed/data.html", "tabbed-shorter")}}</div>
-<p class="hidden">Le code source de cet exemple interactif est disponible dans un dépôt GitHub. Si vous souhaitez contribuez à ces exemples, n'hésitez pas à cloner <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> et à envoyer une <em>pull request</em> !</p>
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/fr/docs/Web/Guide/HTML/Content_categories">Catégories de contenu</a></th>
+ <td><a href="/fr/docs/Web/Guide/HTML/Content_categories#flow_content">Contenu de flux</a>, <a href="/fr/docs/Web/Guide/HTML/Content_categories#phrasing_content">contenu phrasé</a>, <a href="/fr/docs/Web/Guide/HTML/Content_categories#palpable_content">contenu tangible</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Contenu autorisé</th>
+ <td><a href="/fr/docs/Web/Guide/HTML/Content_categories#phrasing_content">Contenu phrasé</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Omission de balises</th>
+ <td> Aucune, la balise d'ouverture et la balise de fermeture sont obligatoires.</td>
+ </tr>
+ <tr>
+ <th scope="row">Éléments parents autorisés</th>
+ <td>Tout élément acceptant du <a href="/fr/docs/Web/Guide/HTML/Content_categories#phrasing_content">contenu phrasé</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Rôle ARIA implicite</th>
+ <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">Pas de rôle correspondant</a></td>
+ </tr>
+ <tr>
+ <th scope="row">Rôles ARIA autorisés</th>
+ <td>Tous les rôles.</td>
+ </tr>
+ <tr>
+ <th scope="row">Interface DOM</th>
+ <td><a href="/fr/docs/Web/API/HTMLDataElement"><code>HTMLDataElement</code></a></td>
+ </tr>
+ </tbody>
+</table>
-<h2 id="Attributs">Attributs</h2>
+<h2 id="attributes">Attributs</h2>
-<p>Comme pour tous les autres éléments, on peut utiliser <a href="/fr/docs/Web/HTML/Attributs_universels">les attributs universels</a> sur <code>&lt;data&gt;</code>.</p>
+<p>Comme pour tous les autres éléments, on peut utiliser <a href="/fr/docs/Web/HTML/Global_attributes">les attributs universels</a> sur <code>&lt;data&gt;</code>.</p>
<dl>
- <dt>{{htmlattrdef("value")}}</dt>
- <dd>Cet attribut définit la version du contenu qui doit être interprétée par une machine.</dd>
+ <dt><code id="attr-value">value</code></dt>
+ <dd>Cet attribut définit la version du contenu qui doit être interprétée par une machine.</dd>
</dl>
-<h2 id="Exemples">Exemples</h2>
+<h2 id="examples">Exemples</h2>
<p>Dans l'exemple suivant, on affiche des noms de produits avec des codes correspondants :</p>
-<h3 id="HTML">HTML</h3>
-
-<pre class="brush: html notranslate">&lt;p&gt;Nouveaux produits&lt;/p&gt;
+<pre class="brush: html">&lt;p&gt;Nouveaux produits&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;data value="3251546"&gt;Mini voiture&lt;/data&gt;&lt;/li&gt;
&lt;li&gt;&lt;data value="5867654"&gt;Grande voiture&lt;/data&gt;&lt;/li&gt;
@@ -39,69 +70,16 @@ translation_of: Web/HTML/Element/data
&lt;/ul&gt;
</pre>
-<h3 id="Résultat">Résultat</h3>
-
-<p>{{EmbedLiveSample("Exemples","200","180")}}</p>
-
-<h2 id="Résumé_technique">Résumé technique</h2>
-
-<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égorie_de_contenu#Contenu_phras.C3.A9">contenu phrasé</a>, <a href="/fr/docs/Web/HTML/Catégorie_de_contenu#Contenu_tangible">contenu tangible</a>.</td>
- </tr>
- <tr>
- <th scope="row"><dfn>Contenu autorisé</dfn></th>
- <td><a href="/fr/docs/Web/HTML/Catégorie_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égorie_de_contenu#Contenu_phras.C3.A9">contenu phrasé</a>.</td>
- </tr>
- <tr>
- <th scope="row"><dfn>Interface DOM</dfn></th>
- <td>{{domxref("HTMLDataElement")}}</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', 'semantics.html#the-data-element', '&lt;data&gt;')}}</td>
- <td>{{Spec2('HTML WHATWG')}}</td>
- <td>Pas de changement depuis {{Spec2('HTML5 W3C')}}</td>
- </tr>
- <tr>
- <td>{{SpecName('HTML5 W3C', 'textlevel-semantics.html#the-data-element', '&lt;data&gt;')}}</td>
- <td>{{Spec2('HTML5 W3C')}}</td>
- <td>Définition initiale.</td>
- </tr>
- </tbody>
-</table>
+<h2 id="specifications">Spécifications</h2>
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+<p>{{Specifications}}</p>
-<div class="hidden">Ce tableau de compatibilité a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à envoyer une <em>pull request</em> sur <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</div>
+<h2 id="browser_compatibility">Compatibilité des navigateurs</h2>
-<p>{{Compat("html.elements.data")}}</p>
+<p>{{Compat}}</p>
-<h2 id="Voir_aussi">Voir aussi</h2>
+<h2 id="see_also">Voir aussi</h2>
<ul>
- <li>L'élément {{HTMLElement("time")}}.</li>
+ <li>L'élément <a href="/fr/docs/Web/HTML/Element/time"><code>&lt;time&gt;</code></a>.</li>
</ul>