HTML <embed> 元素将外部内容嵌入文档中的指定位置。此内容由外部应用程序或其他交互式内容源(如浏览器插件)提供。

[!NOTE] 这篇文档仅定义该元素在 HTML5 中定义的部分,不包含该元素之前的声明内容和非标准的实现。

请记住,大多数现代浏览器已经弃用并取消了对浏览器插件的支持,所以如果你希望你的网站可以在普通用户的浏览器上运行,那么依靠 <embed> 通常是不明智的。

Content categories Flow content, phrasing content, embedded content, interactive content, palpable content.
Permitted content None, it is an {{Glossary("empty element")}}.
Tag omission Must have a start tag, and must not have an end tag.
Permitted parents Any element that accepts embedded content.
Permitted ARIA roles application, document, img, presentation
DOM interface HTMLEmbedElement

属性

这个元素的属性包括 全局属性

  • height
  • src
    • : 被嵌套的资源的 URL。
  • type
    • : 用于选择插件实例化的 MIME 类型。
  • width

例子

<embed type="video/quicktime" src="movie.mov" width="640" height="480" />