diff options
author | tristantheb <tristantheb@users.noreply.github.com> | 2021-06-06 11:44:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-06 11:44:55 +0200 |
commit | 6f85683973762f84f6d99211b3b6158059e16f5a (patch) | |
tree | 19dbf2006709d2841b8535fd3c0d6390edc2643b /files/fr/web/html/attributes/for | |
parent | 6781d84b8a98f4c28efebaf7ed15d0666083ef11 (diff) | |
download | translated-content-6f85683973762f84f6d99211b3b6158059e16f5a.tar.gz translated-content-6f85683973762f84f6d99211b3b6158059e16f5a.tar.bz2 translated-content-6f85683973762f84f6d99211b3b6158059e16f5a.zip |
UPDATE: Update translation of the HTML attributes (#706)
* UPDATE: Refresh of the index page and remove KS
* L10N: Translation of the accept attributes
* UPDATE: Refresh of the autocomplete attribute
* L10N: Translation of the capture attribute
* Revert accept with BCD (but table not exist)
* UPDATE: Refresh the crossorigin attribute
* L10N: Translation of the disabled attribute
* L10N: Translation of the elementtiming attribute
* L10N: Translation of the for attribute
* L10N: Translation of the max attribute
* L10N: Translation of the maxlength attribute
* L10N: Translation of the min attribute
* FIX: Add missing summary
* L10N: Translation of the minlength attribute
* L10N: Translation of the multiple attribute
* UPDATE: Refresh the pattern attribute
* L10N: Translation of the readonly attribute
* L10N: Translation of the rel attribute
* L10N: Translation of the required attribute
* L10N: Translation of the size attribute
* L10N: Translation of the step attribute
* Review - attr accept
* Typo live sample
* Review - capture
* Review - autocomplete
* Review - crossorigin
* Review disabled
* Review elementtiming
* Review - for
* Review max
* Review - maxlength
* Review min
* Review minlength
* Review multiple
* Review pattern
* Review readonly
* Review rel
* Review required
* Review size
* Review step
* Review attributes index
Co-authored-by: julieng <julien.gattelier@gmail.com>
Diffstat (limited to 'files/fr/web/html/attributes/for')
-rw-r--r-- | files/fr/web/html/attributes/for/index.html | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/files/fr/web/html/attributes/for/index.html b/files/fr/web/html/attributes/for/index.html new file mode 100644 index 0000000000..3499bc9489 --- /dev/null +++ b/files/fr/web/html/attributes/for/index.html @@ -0,0 +1,70 @@ +--- +title: 'Attribut HTML : for' +slug: Web/HTML/Attributes/for +tags: + - Attribute + - Attributes + - HTML + - for + - Reference +translation_of: Web/HTML/Attributes/for +--- +<p>{{HTMLSidebar}}</p> + +<p class="summary">L'attribut <strong><code>for</code></strong> est un attribut autorisé pour <a href="/fr/docs/Web/HTML/Element/label"><code><label></code></a> et <a href="/fr/docs/Web/HTML/Element/output"><code><output></code></a>. Lorsqu'il est utilisé sur un élément <code><label></code>, il indique l'élément de formulaire que ce label décrit. Lorsqu'il est utilisé sur un élément <code><output></code>, il permet une relation explicite entre les éléments, qui représentent les valeurs, qui sont utilisées dans le résultat représenté par <code><output></code>.</p> + +<h2 id="usage">Utilisation</h2> + +<p>Lorsqu'il est utilisé comme attribut de <code><label></code>, l'attribut <code>for</code> a une valeur qui est l'<code>id</code> de l'élément de formulaire, auquel il se rapporte.</p> + +<pre class="brush: html"><label for="username">Votre nom</label> +<input type="text" id="username"></pre> + +<p>Lorsqu'il est utilisé comme attribut de <code><output></code>, l'attribut <code>for</code> a une valeur qui est une liste séparée, par des espaces, des valeurs <code>id</code> des éléments, qui sont utilisés pour créer l'output.</p> + +<pre class="brush: html"><input type="range" id="b" name="b" value="50"> + +<input type="number" id="a" name="a" value="10"> = +<output name="result" for="a b">60</output></pre> + +<h2 id="examples">Exemples</h2> + +<p>Voir des exemples d'utilisation sur les pages des éléments pour <a href="/fr/docs/Web/HTML/Element/label"><code><label></code></a> et <a href="/fr/docs/Web/HTML/Element/output"><code><output></code></a>.</p> + +<h2 id="specifications">Spécifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'forms.html#attr-label-for', 'for as used with label')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', 'form-elements.html#attr-output-for', 'for as used with output')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'sec-forms.html#element-attrdef-label-for', 'for as used with label')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'sec-forms.html#element-attrdef-output-for', 'for as used with output')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + </tr> + </tbody> +</table> + +<h2 id="browser_compatibility">Compatibilité des navigateurs</h2> + +<h3>Prise en charge pour label</h3> + +<p>{{Compat("html.elements.label.for")}}</p> + +<h3>Prise en charge pour output</h3> + +<p>{{Compat("html.elements.output.for")}}</p> |