Open In App

HTML DOM embed type property

The DOM embed height property in HTML is used to set or return the value of the type attribute in an embed element. The type attribute specifies the MIME type of the embedded content.

Syntax:



embedObject.type
embedObject.type = MIME_type

Property Values:

Return Values: It returns a string value that represents the MIME type of the linked Document. 



Example: 




<!DOCTYPE html>
<html>
   
<head>
    <title>HTML DOM Embed type Property</title>
</head>
 
<body>
    <center>
        <h1 style="color:green">
            GeeksforGeeks
        </h1>
 
        <embed id="embedID"
               type="application/x-shockwave-flash"
               src="https://ide.geeksforgeeks.org">
        <br>
 
        <button onclick="GFGfun()">
            Try it
        </button>
 
        <p id="pid"></p>
 
        <script>
            function GFGfun() {
                let idtype =
                    document.getElementById("embedID").type;
 
                document.getElementById("pid").innerHTML
                    = idtype;
            }
        </script>
    </center>
</body>
   
</html>

Output: 

 

Supported Browsers: The browsers supported by DOM embed type property are listed below:


Article Tags :