HTML embed 标签

htmlweb developmentfront end technology更新于 2025/9/8 4:28:17

<embed> 标签用于在 HTML 文档中包含外部应用程序。

以下是属性 −

  • height:嵌入内容的高度(以像素为单位)。
  • src:要嵌入的外部文件的地址,即 URL。
  • type:指定嵌入内容的媒体类型的媒体类型
  • width:嵌入内容的宽度(以像素为单位)。

现在让我们看一个在 HTML − 中实现 <embed> 标签的示例

示例

<!DOCTYPE html>
<html>
<body>
<h2>CSS 演示应用程序</h2>
   <embed src="https://www.cainiaomax.com/flex/samples/CSSApplication.swf" height="400" width="600">
</body>
</html>

输出

在上面的例子中,我们使用了 <embed> 元素 −

<embed src="https://www.cainiaomax.com/flex/samples/CSSApplication.swf" height="400" width="600">

在 embed 元素的 src 属性下,我们以 .srf 文件的形式设置了一个外部应用程序 −

https://www.cainiaomax.com/flex/samples/CSSApplication.swf

相关文章


有用资源