Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

HTML | DOM Object type Property

  • Difficulty Level : Basic
  • Last Updated : 22 Apr, 2019

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.


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

  • It returns the type property.
  • It is used to set the type property.
    objObject.type = media_type 

Property Values: It contains the value i.e media_type which specify the Internet media type of the embedded file.

Return Value: It returns a string value which represents the Internet media type of the embedded file.

Example: This Example returns a type Property.

<!DOCTYPE html>
        <object id="myobject" 
        <h2>DOM Object type Property</h2>
        <p>Click the button to get the
          height of the embedded file.</p>
        <button onclick="Geeks()">
            Click it
        <p id="gfg"
        function Geeks() {
            // Accessing Object element. 
            var x =
                "gfg").innerHTML = x;

Before Clicking On Button:

After Clicking On Button:

Supported Browsers:

  • Google Chrome
  • Mozilla Firefox
  • Edge
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :