Open In App

HTML | <object> form Attribute

Last Updated : 19 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <object> form Attribute is used to specify the one or more forms that the <object> Element belongs to

Syntax: 

<object form="form_id">

Attribute Values: 

  • form_id: It is used to specify the <form> elements that the <object> element belongs to . The value of this attribute should be the id attribute of the form elements. 

Example: 

html




<!DOCTYPE html>
<html>
 
<body>
    <center>
        <object id="myobject"
                width="400"
                height="100"
                name="myGeeks"
                form="myGeeks"
                data=
        </object>
       
        <h1>GeeksForGeeks</h1>
        <h2>HTML Object &lt;form&gt; Attribute</h2>
       
        <form id="myGeeks">
            <label>Name</label>
            <input type="text">
            <input type="submit">
        </form>
    </center>
</body>
 
</html>


Output:

  

Supported Browsers:  Browsers supported by HTML <object> form Attribute.

  • Google Chrome 
  • Edge 12
  • Internet Explorer 
  • Firefox 1
  • Opera 
  • Safari 

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads