From 6f85683973762f84f6d99211b3b6158059e16f5a Mon Sep 17 00:00:00 2001 From: tristantheb Date: Sun, 6 Jun 2021 11:44:55 +0200 Subject: 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 --- files/fr/web/html/attributes/for/index.html | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 files/fr/web/html/attributes/for/index.html (limited to 'files/fr/web/html/attributes/for') 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 +--- +

{{HTMLSidebar}}

+ +

L'attribut for est un attribut autorisé pour <label> et <output>. Lorsqu'il est utilisé sur un élément <label>, il indique l'élément de formulaire que ce label décrit. Lorsqu'il est utilisé sur un élément <output>, 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 <output>.

+ +

Utilisation

+ +

Lorsqu'il est utilisé comme attribut de <label>, l'attribut for a une valeur qui est l'id de l'élément de formulaire, auquel il se rapporte.

+ +
<label for="username">Votre nom</label>
+<input type="text" id="username">
+ +

Lorsqu'il est utilisé comme attribut de <output>, l'attribut for a une valeur qui est une liste séparée, par des espaces, des valeurs id des éléments, qui sont utilisés pour créer l'output.

+ +
<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>
+ +

Exemples

+ +

Voir des exemples d'utilisation sur les pages des éléments pour <label> et <output>.

+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationStatut
{{SpecName('HTML WHATWG', 'forms.html#attr-label-for', 'for as used with label')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML WHATWG', 'form-elements.html#attr-output-for', 'for as used with output')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5 W3C', 'sec-forms.html#element-attrdef-label-for', 'for as used with label')}}{{Spec2('HTML5 W3C')}}
{{SpecName('HTML5 W3C', 'sec-forms.html#element-attrdef-output-for', 'for as used with output')}}{{Spec2('HTML5 W3C')}}
+ +

Compatibilité des navigateurs

+ +

Prise en charge pour label

+ +

{{Compat("html.elements.label.for")}}

+ +

Prise en charge pour output

+ +

{{Compat("html.elements.output.for")}}

-- cgit v1.2.3-54-g00ecf