THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <object> form Attribute

❮ HTML <object> tag

Example

An <object> element located outside a form (but still a part of the form):

<form action="/action_page.php" id="form1">
  First name: <input type="text" name="fname"><br>
  <input type="submit" value="Submit">
</form>

<object data="helloworld.swf" height="400" width="400" form="form1" name="obj1"></object>
Try it Yourself »

Definition and Usage

The form attribute specifies one or more forms the <object> element belongs to.


Browser Support

Attribute
form Not supported Not supported Not supported Not supported Not supported

Differences Between HTML 4.01 and HTML5

The form attribute is new in HTML5.


Syntax

<object form="form_id">

Attribute Values

Value Description
form_id Specifies the <form> element the <object> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

❮ HTML <object> tag