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 HTML | DOM Object width Property The DOM Object width Property in HTML DOM is used to set or return the width of the Object. The width attribute is used to specify the width of an Object. Syntax: It returns the width property. objObject.widthIt is used to set the width property. objObject.width = pixels Property Values: It contains 2 min read HTML DOM Object hspace Property The HTML DOM Object hspace property is used to set or return the value of the hspace attribute of the <object> element. The hspace attribute is used to specify the number of whitespaces for the left and right side of an Object. Syntax It returns the hspace Property. objObject.hspace; It sets t 2 min read HTML DOM Object vspace Property The HTML DOM Object vspace property is used to set or return the value of the vspace attribute of the object element. The vspace attribute is used to specify the number of whitespaces from the top and bottom sides of an object. Syntax It returns the object vspace property. objObject.vspace; It sets 2 min read HTML | DOM Pre Object The DOM Pre Object is used to represent the HTML <pre> element. The pre element is accessed by getElementById().Properties: width: It is used to set or return the value of the width attribute of the pre element. Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âpreâ 1 min read HTML | DOM Object Object The Object object represents only HTML <object> element. We can access any <object> element by using the getElementById(); and also can create object element by using createElement(); method.Syntax: It is used to access Object element document.getElementById("id"); It is used to create o 2 min read Like