This shows you the differences between two versions of the page.
notices:html-css:utiliser-la-balise-label-ainsi-que-les-attributs-for-et-id-pour-associer-les-champs-a-leurs-intitules [11 June 2013 at 14:37] Sébastien Delorme (Atalan) [Related recommendations] |
notices:html-css:utiliser-la-balise-label-ainsi-que-les-attributs-for-et-id-pour-associer-les-champs-a-leurs-intitules [30 December 2013 at 18:07] (current) Sébastien Delorme (Atalan) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== 7.1.1. Use the <label> tag as well as the “for” and “id” attributes to associate form controls with their text labels ====== | ====== 7.1.1. Use the <label> tag as well as the “for” and “id” attributes to associate form controls with their text labels ====== | ||
- | Each form controls (except buttons) must be associated with a label. | + | Each form control (except buttons) must be associated with a label. |
To do this, proceed as follows: | To do this, proceed as follows: | ||
- Use ''<label>'' to tag each text label. | - Use ''<label>'' to tag each text label. | ||
- | - Add a ''for'' attribute for each ''<label>'' tag as well as an ''id'' attribute for each form control. | + | - Add a ''for'' attribute to each ''<label>'' tag as well as an ''id'' attribute to each form control. |
- Enter an identical value for the id and for attributes for each text label/form control pair. | - Enter an identical value for the id and for attributes for each text label/form control pair. | ||