English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML 参考手册

HTML 标签大全

HTML: <embed> Tag

HTML <embed>标签是HTML5元素,用作嵌入外部内容(例如外部应用程序或浏览器插件)的容器。由于兼容性问题,与 <embed>标签相比, <object>标签更常用于嵌入资源。此标签通常也称为 <embed>元素。

在线示例

嵌入的 flash 动画片:

!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>基础教程网(oldtoolbag.com)</title> 
</head>
<body>
<embed type="application/x-shockwave-flash" src="bookmark.swf" width="400" height="300">
</body>
</html>
Test and See ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the <embed> tag.

Tag Definition and Usage Description

The <embed> tag defines a container for embedding external applications or interactive programs (plugins).

Since the <embed> tag is only available in HTML5available, so the <object> tag is used for HTML4or XHTML.

HTML 4.01 and HTML5differences between

<embed> Tag is an HTML 5 new tags in

Attribute

AttributeValueDescription
heightHTML5pixelsSpecify the height of the embedded content.
srcHTML5URL Specify the URL of the content to be embedded.
typeHTML5MIME_typeSpecify the MIME type of the embedded content.
Note: MIME = Multipurpose Internet Mail Extensions.
widthHTML5pixelsSpecify the width of the embedded content.

Global Attributes

Support for <embed> Tag Global Attributes of HTML.

Event Attributes

Support for <embed> Tag HTML Event Attributes.