HTMLEmbedElement: type property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}

The **type** property of the {{domxref("HTMLEmbedElement")}} interface returns a string that reflects the type attribute of the {{HTMLElement("embed")}} element, indicating the {{glossary("MIME type")}} of the resource. It reflects the {{htmlelement("embed")}} element's [type](/en-US/docs/Web/HTML/Reference/Elements/embed#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

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLObjectElement.type")}}
  • {{domxref("HTMLSourceElement.type")}}
  • Media types found on the web
  • Important MIME types for web developers