share.png

HTML <embed> 标签

HTML <embed> 标签

日期:2022-07-05

本文字数:190 字 阅读完需:约 1 分钟

HTML 标签

实例

嵌入图片:

< embed type = " image/jpg " src = " https://static.runoob.com/images/runoob-logo.png " width = " 258 " height = " 39 " >

尝试一下 »

实例

嵌入 HTML 页面:

< embed type = " text/html " src = " snippet.html " width = " 500 " height = " 200 " >

尝试一下 »

实例

嵌入视频:

< embed type = " video/webm " src = " video.mp4 " width = " 400 " height = " 300 " >

尝试一下 »


浏览器支持

![Internet Explorer][] ![Firefox][Internet Explorer] ![Opera][Internet Explorer] ![Google Chrome][Internet Explorer] ![Safari][Internet Explorer]

所有主流浏览器都支持 标签。


标签定义及使用说明

标签定义了一个容器,用来嵌入外部应用或者互动程序(插件)。

注意:现在已经不建议使用 标签了,可以使用


HTML 4.01 与 HTML5之间的差异

标签是 HTML 5 中的新标签。


属性

New :HTML5 中的新属性。

属性描述
heightNewpixels规定嵌入内容的高度。
srcNewURL 规定被嵌入内容的 URL。
typeNewMIME_type规定嵌入内容的 MIME 类型。
注:MIME = Multipurpose Internet Mail Extensions。
widthNewpixels规定嵌入内容的宽度。

全局属性

标签支持 HTML 的全局属性。


事件属性

标签支持 HTML 的事件属性。

[Internet Explorer]: