HTMLEmbedElement: type property

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

js
const el = document.getElementById("el");
console.log(el.type); // Output: "video/webp"

Specifications

Browser compatibility

See also