English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die for-Eigenschaft spezifiziert, an welchen Formularelementen das Etikett gebunden ist.
Drei Auswahlkästchen mit Etiketten:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Verwendung der HTML <label> for -Eigenschaft-Einführung(oldtoolbag.com)</title> </head> <body> <p>Klicken Sie auf das Textetikett, um die Optionen umzuschalten</p>> <form action="action_page.php"> <label for="male">Männlich</label> <input type="radio" name="gender" id="male" value="male"><br> <label for="female">Weiblich</label> <input type="radio" name="gender" id="female" value="female"><br> <label for="other">Other</label> <input type="radio" name="gender" id="other" value="other"><br><br> <input type="submit" value="Submit"> </form> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the for attribute.
The for attribute specifies the form element bound to the label.
None.
<label for="element_id">
Value | Description |
---|---|
element_id | The id of the element bound to the label. |