English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Wenn HTML-Formularfelder gruppiert werden, wird das HTML- <legend>-Markenzeichen verwendet, um dem <fieldset>-Markenzeichen einen Titel zu erstellen. Dieses Markenzeichen wird auch als <legend>-Element bezeichnet.
Kombinierte Formularelemente:
!doctype html <html> <head> <meta charset="UTF-8"> <title>HTML5 Die Verwendung des <fieldset>-Tags (Grundtutorialsnetz w3(codebox.com)</title> </head> <body> <form> <fieldset> <legend>Kundeninformationen(w3(codebox.com)</legend> Name: <input type="text"><br> Adresse: <input type="text"><br> Telefonnummer: <input type="text"> </fieldset> </form> </body> </html>Testen Sie, um zu sehen ‹/›
In diesem HTML5In der Dokumentation haben wir ein <legend>-Markenzeichen erstellt, das den Titel für die drei Gruppen der <input>-Steuerungen bereitstellt. Das <legend>-Markenzeichen wird über diesen Gruppensteuerungen angezeigt und zeigt den Titel "Kundeninformationen(w"3(codebox.com)。
IEFirefoxOperaChromeSafari
Most web browsers currently support the <legend> tag.
The <legend> element is <fieldset>Element defines the title.
The title generated by the <legend> tag will be presented before the relevant form controls within the <fieldset> and will appear to float above the top border of the <fieldset>.
In HTML 4.01The "align" attribute has been deprecated, HTML5This attribute is not supported. Not recommended for use. Use CSS to set the alignment of the <legend> element.
Attribute | Value | Description |
---|---|---|
align | top bottom left right | HTML5 Not supported. HTML 4.01 Deprecated. Not recommended for use. Use styles instead. Define the alignment for the title within the fieldset. |
<legend> Tag supports global attributes, see the complete attribute table HTML Global Attributes.
<legend> Tag supports all HTML Event Attributes.