CSS Portal

HTML <embed> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <embed> tag is used to embed external content directly into an HTML document. Unlike other tags that display text or images, <embed> allows you to integrate a wide variety of media and interactive content, including multimedia files (such as audio and video), PDF documents, Flash content, and other plugin-based content, depending on the browser's capabilities and installed plugins.

When used, the <embed> element acts as a placeholder for the external resource, rendering it in place within the page. The content is handled by the browser or the relevant plugin, enabling the user to view or interact with it without leaving the page.

One of the main advantages of <embed> is its simplicity: it provides a straightforward way to include content without the need for nested elements or complex scripting. However, because it relies on the browser or external plugins to render the content, the exact behavior may vary depending on the environment and the type of media being embedded.

Typically, <embed> is used as a self-closing tag and is most effective when the type of content and the source file are specified, allowing the browser to interpret it correctly. It is particularly useful for embedding PDF documents, multimedia players, and other interactive content that is not natively handled by HTML.

In modern web development, <embed> is sometimes used as an alternative to the <object> or <iframe> elements, especially when you need to include media files or external interactive content directly into a page with minimal markup.

Properties

Permitted Parents
Any element that accepts embedded content
Content
None. It is an empty element.
Start/End Tags
Start tag: required, End tag: forbidden

Example

<embed type="video/webm" width="240" height="176" src="audio/toy.mp4">

Attributes

height
Specifies the height, in pixels, to display the external content.
src
Specifies the location of the external file. Its value must be the URI of the resource being embedded.
type
Specifies the type of the embedded content. If specified, the value must be a MIME type.
width
Specifies the width, in pixels, to display the external content.

Global Attributes

The <embed> tag also supports the Global Attributes in HTML5

Event Attributes

The <embed> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <embed> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!