English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML <fieldset>-Markierung liegt innerhalb des <form>-Tags und wird verwendet, um die zugehörigen Elemente in einem HTML-Formular zu gruppieren. Verwenden Sie das <legend>-Markierung, um dem <fieldset> einen Titel zu erstellen. Dieses Markierung wird auch als <fieldset>-Element bezeichnet.
Gruppieren Sie die zugehörigen Elementen im Formular:
!doctype html <html> <head> <meta charset="UTF-8"> <title>HTML5 Verwendung des fieldset-Tags (Grundlagen-Tutorial-Netz oldtoolbag.com)</title> </head> <body> <form> <fieldset> <legend> Kundeninformationen(oldtoolbag.com)</legend> Name: <input type="text"><br> Adresse: <input type="text"><br> Telefonnummer: <input type="text"> </fieldset> </form> </body> </html>Testen Sie es heraus ‹/›
Das Ergebnis nach dem Ausführen ist wie folgt:
IEFirefoxOperaChromeSafari
Alle gängigen Browser unterstützen den <fieldset>-Tag.
Der <fieldset>-Tag kann die zugehörigen Elemente innerhalb eines Formulars gruppieren.
Der <fieldset>-Tag zeichnet um die zugehörigen Formularelemente eine Umrandung.
Most browsers will display a black border around the <fieldset> tag, but you can use CSS to change this behavior.
You can use the <legend> tag to display the title of the <fieldset>. This title will be presented before the related form controls within the <fieldset> and will appear floating above the top border of the <fieldset>.
Hint:<legend> The tag defines a title for the <fieldset> element.
HTML5 New attributes added to <fieldset> in HTML: disabled, form, name, HTML 4.01 These attributes are not supported in Chinese.
Attribute | Value | Description |
---|---|---|
disabledHTML5 | disabled | Specifies that the form elements in this group should be disabled. |
formHTML5 | form_id | Specifies one or more forms that the fieldset belongs to. |
nameHTML5 | text | Specifies the name of the fieldset. |
Support for <fieldset> Tag Global Attributes of HTML.
Support for <fieldset> Tag HTML Event Attributes.