HTML fieldset form attributes
Examples
Located in form form outside the <fieldset> element (but still belongs to form part of the form):
<form action="demo_form.html" method="get" id="form1">
What is your favorite color? <input type="text" name="fav_color"><br>
<input type="submit">
</form>
<fieldset form="form1">
Name: <input type="text" name="username"><br>
Email: <input type="text" name="usermail"><br>
</fieldset>
What is your favorite color? <input type="text" name="fav_color"><br>
<input type="submit">
</form>
<fieldset form="form1">
Name: <input type="text" name="username"><br>
Email: <input type="text" name="usermail"><br>
</fieldset>
try it"
Browser Support
Currently, only Opera supports form attribute.
Definition and Usage
One or more form attribute specifies the form fieldset belongs.
Differences between HTML 4.01 and HTML5
form attribute is new in HTML5 attributes.
grammar
<fieldset form=" form_id ">
Property Value
值 | 描述 |
---|---|
form_id | 规定 fieldset 所属的一个或多个表单 id 的空格分隔列表。 |
HTML <fieldset> tag