object form Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:object

Description

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

Attribute Values

Value Description
form_id Specifies the <form> element the <object> element belongs to.

The value of the attribute must be the id attribute of a <form> element in the same document.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php" id="form1">
First name: <input type="text" name="fname"><br>
<input type="submit" value="Submit">
</form><!--   w ww.j av  a  2s .c o  m-->

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

</body>
</html>

Related Tutorials