aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/html/element/data
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/html/element/data
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/html/element/data')
-rw-r--r--files/fr/web/html/element/data/index.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/files/fr/web/html/element/data/index.html b/files/fr/web/html/element/data/index.html
new file mode 100644
index 0000000000..83c25b0833
--- /dev/null
+++ b/files/fr/web/html/element/data/index.html
@@ -0,0 +1,107 @@
+---
+title: <data>
+slug: Web/HTML/Element/data
+tags:
+ - Element
+ - HTML
+ - Reference
+ - Web
+translation_of: Web/HTML/Element/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>
+
+<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>
+
+<h2 id="Attributs">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>
+
+<dl>
+ <dt>{{htmlattrdef("value")}}</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>
+
+<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;
+&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;
+ &lt;li&gt;&lt;data value="9887635"&gt;Énorme voiture&lt;/data&gt;&lt;/li&gt;
+&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="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<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>
+
+<p>{{Compat("html.elements.data")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>L'élément {{HTMLElement("time")}}.</li>
+</ul>