HTML | DOM Object data Property Last Updated : 25 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The HTML | DOM Object data Property is used to set or return the value of the data attribute of an <object> element. The data attribute is used to specify the URL of the resource which will be used by the object.Syntax: Return the data property. objObject.dataIt is used to set the data property. objObject.data = URL Property Values: It contains the value i.e URL which specifies the URL of the resource. Absolute URL: It is used to point another website.Relative URL: It points to link within a website. Return Value: It returns a String that represents the object URL. Returns the full URL, including the protocol (like http://) Example: This Example returns a data Property. HTML <!DOCTYPE html> <html> <body> <center> <object id="myobject" data="HelloGeeks.swf" width="400" height="100" name="myGeeks" form="myGeeks" data= "https://media.geeksforgeeks.org/wp-content/uploads/geek-8.png"> </object> <h2>DOM Object data Property</h2> <button onclick="Geeks()"> Click it </button> <p id="gfg" style="color:green; font-size:25px;"> </p> </center> <script> function Geeks() { // return object data type Property var x = document.getElementById( "myobject").data; document.getElementById( "gfg").innerHTML = x; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: Google Chrome Mozilla Firefox Edge Safari Opera Comment More infoAdvertise with us Next Article HTML | DOM Object data Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Object align Property The HTML DOM Object align property is used to set or return the value of the data attribute of an element. Note: This property is not supported by HTML5 Syntax: It returns the object align property.objectobject.align;It sets the object to align property.objectobject.align="left | right | middle | to 2 min read HTML | DOM Object form Property The DOM Object form Property in HTML DOM is used to set or return the value of the form attribute of an <object> element. The form attribute is used to specify the one or more forms the <object> will contain. Syntax: It returns the form property.objObject.formIt is used to set the form p 1 min read HTML | DOM Object name Property The HTML | DOM Object name Property is used to set or return the value of a name attribute of an <object> element. The name attribute is used to specify the name of the embedded file. Syntax: It returns the name property objObject.nameIt is used to set the name property. objObject.name = name 2 min read HTML | DOM Object type Property The HTML | DOM Object type Property is used to set or return the value of a type attribute of a <object> element. The type attribute is used to specify the Internet type of MIME type of the Object. Syntax: It returns the type property.objObject.typeIt is used to set the type property.objObject 1 min read HTML | DOM Details open Property The Details open property in HTML DOM is used to set or return whether the hidden information is visible or not to the user. This property is used to reflect the HTML open attribute. Syntax: It returns the Details open property. detailsObject.openIt is used to set the Details open property. detailsO 2 min read Like