HTMLEmbedElement: type property
HTML DOM
HTML DOM
The type property of the HTMLEmbedElement interface returns a string that reflects the type attribute of the embed element, indicating the MIME type of the resource. It reflects the embed element's type attribute
Value
A string; the MIME type of the resource.
Examples
const el = document.getElementById("el");
console.log(el.type); // Output: "video/webp"
Specifications
Browser compatibility
See also
- HTMLObjectElement.type
- HTMLSourceElement.type
- Media types found on the web
- Important MIME types for web developers