Valid XHTML 1.0 Strict
Apprendre le XHTML > Formulaire Xhtml > Balise LABEL

La balise <label>

La balise <label> définit une étiquette d'un champ de formulaire d'une page web xhtml (balise de type EN LIGNE). La balise <label> possède un attribut for qui fait référence à l'attribut id d'un champ de formulaire. Cela permet ainsi d'associer la balise <label> avec le champ auquel elle correspond.

Utilisation de la balise <label>

<form action="">
     <fieldset>
          <legend>Informations sur vous</legend>
          <label for="nom">Nom</label> : <input type="text" name="monNom" id="nom" />
          <label for="prenom">Prénom</label> : <input type="text" name="monPrenom" id="prenom" />
     </fieldset>
</form>


affichera :

Informations sur vous : :
agence creation site internet  | 
agence creation sites  | 
agence web la rochelle  | 
conjugaison  | 
creation sites  | 
developpeur web  | 
dictionnaire  | 
prototype.js  | 
Quizz cinéma  | 
scriptaculous  | 
video buzz