English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
L'attributo for specifica a quale elemento del modulo è associato l'etichetta.
Tre pulsanti radio con etichette:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Utilizzo dell'attributo HTML <label> for - Tutorial di base (oldtoolbag.com)</title> </head> <body> <p>Clicca sul testo etichetta per passare tra le opzioni</p>> <form action="action_page.php"> <label for="male">Maschio</label> <input type="radio" name="gender" id="male" value="male"><br> <label for="female">Femmina</label> <input type="radio" name="gender" id="female" value="female"><br> <label for="other">Altro</label> <input type="radio" name="gender" id="other" value="other"><br><br> <input type="submit" value="Invia"> </form> </body> </html>Prova a vedere ‹/›
IEFirefoxOperaChromeSafari
Tutti i browser mainstream supportano l'attributo for.
L'attributo for specifica l'elemento del modulo al quale è associato il label.
Nessuna.
<label for="element_id">
Valore | Descrizione |
---|---|
element_id | ID dell'elemento al quale è associato il label. |