HTML | DOM Object Object Last Updated : 31 Aug, 2021 Comments Improve Suggest changes Like Article Like Report 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 object element document.createElement("object"); Property Values: PropertyDescriptionalignIt is used to set or return the alignment of the objectarchiveIt is used to set or return a string which is useful in implementation of archive functionborderIt is used to set or returnsthe border around objectcodeIt is used to set or return the src url of files of compiled java classes.codeBaseIt is used to set or return URL of componentsdataIt is used to set or return the URL of the resourceformIt is used to return parent form's referenceheightIt is used to set or return object's heighthspaceSet or return horizontal marginnameSet or return object's namestandbyIt is used to sets or return message while object loadingtypeIt is used to sets or return the content type for data downloadeduseMapIt is used to sets or returns the name of a image map of client-sidevspaceSets or return vertical marginwidthIt is used to sets or return width of object Example-1: Access object element and return the URL of the resource html <!DOCTYPE html> <html> <body> <center> <object id="myobject" width="400" data="https://media.geeksforgeeks.org/wp-content/uploads/geek-8.png"> </object> <p>Click the button to get the URL of the embedded file.</p> <button onclick="Geeks()"> Click it </button> <p id="gfg"></p> </center> <script> function Geeks() { // Accessing Object element. var x = document.getElementById( "myobject").data; document.getElementById( "gfg").innerHTML = x; } </script> </body> </html> Output: Before clicking on the button: After clicking on the button: Example-2: Create object element using document.createElement. html <!DOCTYPE html> <html> <body> <center> <p>Click the button to create an Object element with an embedded file.</p> <button onclick="Geeks()"> Click it </button> <p id="gfg"></p> <script> function Geeks() { // Creating object element. var x = document.createElement( "OBJECT"); // Set data of the OBJECT. x.setAttribute("data", "https://media.geeksforgeeks.org/wp-content/uploads/geek-8.png"); x.setAttribute("width", "400"); x.setAttribute("height", "100"); document.body.appendChild(x); } </script> </center> </body> </html> Output: Before clicking on the button: After clicking on the button: Supported Browsers: Google ChromeMozilla FirefoxEdgeSafariOpera Comment More infoAdvertise with us S Sabya_Samadder Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM isDefaultNamespace() Method The DOM isDefaultNamespace() method is used to return boolean true if the specified namespace is default otherwise, it returns boolean false. The URI of the namespace required can be checked using the namespaceURI string. Syntax:node.isDefaultNamespaceReturn Value: It returns a boolean value true if 1 min read HTML | DOM Style animationName Property The animationName Property in HTML DOM is used to set or returns a name for @keyframes animation. Syntax: It is used to set the animationName property:object.style.animationName = "none|keyframename|initial|inherit"It is used to return the animationName property:object.style.animationName Property V 3 min read HTML DOM Style transition Property The HTML DOM Style Property is used to change the appearance of any DIV element. It changes the appearance whenever the mouse hovers over that element. SyntaxFor return the transition property:object.style.transitionFor set the transition property:object.style.transition = "property duration timing 2 min read HTML | DOM Textarea maxlength Property The DOM Textarea maxlength Property is used to set or return the value of the maxlength attribute of a textarea field. It specifies the maximum number of characters that have been allowed in the Element. Syntax: It is used to return the maxLength property: textareaObject.maxLength It is used to set 2 min read HTML | DOM meter Object The DOM Meter Object is used to represent the HTML <meter> element. The meter element is accessed by getElementById().Properties: form: It belongs to one or more forms that it belongs too.max: It is used to specify the maximum value of a range.min: It is used to specify the minimum value of a 2 min read HTML | DOM Textarea placeholder Property The DOM Textarea placeHolder Property is used to set or return the value of the placeholder attribute of a textarea field. It specifies a short hint that describes the expected value of an input field / textarea. A short message or hint displayed before entering value in textarea. Syntax: It is used 2 min read HTML | DOM Style backfaceVisibility Property The backfaceVisibility property is the deciding factor that would make an element visible or invisible when the element is not facing the screen. This property is helpful when an element is rotated, and its backside needs to be hidden. Syntax: Return the backfaceVisibility property:object.style.back 3 min read HTML | DOM HTML Object The HTML Object property in HTML DOM is used to represent or access the HTML <html> element with in the object. The <html> element is used to return the HTML document as an Element Object. Syntax: It is used to access a <html> element.var x = document.getElementsByTagName("HTML")[0 3 min read HTML | DOM IFrame Object The IFrame Object property in HTML DOM is used to create and access the <iframe> element within the object. An inline frame is used for embedding another document within the current HTML document. Syntax:It is used to access a <iframe> element.var x = document.getElementById("myframe");I 3 min read HTML | DOM Input Color Object The Input Color Object property in HTML DOM is used to create and access the <input> element within the object. The <input> is used to enter data in the input field. Declaration of input control that allow user to input data is can be done by <input> elements are used within a < 3 min read Like