A <fieldset> element located outside a form (but still a part of the form).
The form
attribute specifies the form the fieldset belongs to.
The value of this attribute must be equal to the id
attribute of a <form>
element in the same document.
<fieldset form="form_id">
Value | Description |
---|---|
form_id | Specifies the form element the <fieldset> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
Example:
HTML
<form action="/action_page.php" method="get" id="form1">
<label for="favcolor">What is your favorite color?</label>
<input type="text" id="favcolor" name="favcolor">
<input type="submit">
</form>
<fieldset form="form1">
<legend>Personalia:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname" form="form1"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname" form="form1">
</fieldset>
How to create HTML <fieldset> Tag | HTML Tag |
Which browser will support for HTML <fieldset> Tag | HTML Tag |
Attributes for HTML <fieldset> Tag | HTML Tag |
How to Use CSS to style <fieldset> and <legend> | HTML Tag |
How to set Default CSS Settings for HTML <fieldset> Tag | HTML Tag |
How to add HTML <fieldset> disabled Attribute | HTML Tag |
How to add HTML <fieldset> form Attribute | HTML Tag |
How to add HTML <fieldset> name Attribute | HTML Tag |
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |