HTML slt;fieldset and form properties

HTML fieldset form property HTML slt;fieldset.tags

The form property defines a form that belongs to fieldset, see the following example:

The element (but still part of the form form) that is located outside the form form:

<form action="demo-form.php" method="get" id="form1">
你喜欢的颜色是什么?<input type="text" name="fav_color"><br>
<input type="submit">
</form>

<fieldset form="form1">
姓名: <input type="text" name="username"><br>
邮箱: <input type="text" name="usermail"><br>
</fieldset>

Try it out . . .

Browser support

HTML fieldset form property HTML fieldset form property HTML fieldset form property HTML fieldset form property HTML fieldset form property

Currently, only Opera supports the form property.


Definitions and usages

The form property specifies one or more forms to which fieldset belongs.

Tip: The value of the form property must be the id of the form to which it belongs.

Tip: To refer to more than one form, use a space-separated list.


The difference between HTML 4.01 and HTML5

The form property is a new property in HTML5.


Grammar

<fieldset form="form_id">

The property value

value describe
form_id Specifies a list of space separated by one or more form IDs belonging to the FieldSet.


HTML fieldset form property HTML slt;fieldset.tags

Related articles

HTML DOM Reference Manual: HTML DOM Fieldset Form property