The <embed> element embeds external content at a point in the document. The browser (or a built-in handler) displays the resource from src, such as an image or a PDF in the browser’s PDF viewer.
Not deprecated and not experimental. Stable across modern browsers since about July 2015.
Plugins are gone.
Do not rely on Flash or other classic browser plug-ins. Modern engines no longer support them. Use HTML media and documents the browser can handle natively.
Void element.
<embed> has no end tag and no child fallback markup. Keep attributes on the single start tag.
Add title with a concise description of the embedded content.
Avoid vague labels like “embed” or “file”.
Especially important when the resource is interactive (audio/video-like content).
Keep globals available — title is one of them, documented for accessibility on embeds.
Example 4 — Prefer <video> for Movies
For playable video with controls and fallback text, use <video> instead of <embed>.
HTML
<!-- Prefer this for video -->
<video src="clip.mp4" controls width="640" height="360">
Your browser does not support HTML video.
</video>
<!-- Avoid relying on embed + old plugins -->
<!-- <embed src="clip.mp4" type="video/mp4" width="640" height="360"> -->
Use <video> for movies with native controls and fallback text.
<embed> cannot hold fallback children; <video> can.
How It Works
Ask what you are embedding (video, audio, page, PDF, image).
Pick the dedicated element when one exists (video, audio, iframe, img).
Use object when you need inner fallback markup.
Reach for embed mainly when a simple native handler (like a PDF viewer) is enough and you do not need children.
Edge Cases & Pitfalls
Most embed issues come from plugins, missing labels, or using the wrong element.
plugins
No Flash / NPAPI
Classic plug-ins are unsupported. Ship HTML media or documents the browser can open itself.
fallback
No child fallback
<embed> cannot wrap alternate HTML. Prefer <object> or <video> when you need fallback content.
sizing
No percentage width/height
Attributes must be absolute CSS pixel lengths. Scale with CSS on a wrapper if you need fluid layout.
a11y
Always name it
Add a concise title. Without it, screen reader users may not know what the embed contains.
css
object-fit ignored
object-fit does not apply to <embed>. object-position can still adjust placement in the frame.
Compatibility
Browser Support
The <embed> element is core HTML. Support for a given resource depends on what the browser can handle (image, PDF viewer, and so on).
✓ Baseline · Widely available
<embed>
Widely available since about July 2015. Element support is universal; plug-in content is not. Prefer native HTML media and documents.
95%Element support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<embed>Widely supported
Bottom line: Safe as an embedding hook for browser-handled resources. Do not depend on obsolete plug-ins; choose video, audio, iframe, img, or object when they fit better.
Remember
Key Takeaways
Role:<embed> inserts external content the browser can handle.
Core attrs:src, type, absolute width/height, and a clear title.
Void: no end tag and no fallback children — use object/video when you need them.
Modern path: skip plug-ins; prefer dedicated media and frame elements first.
One line: use <embed> for simple browser-handled resources — and label it with title.
UA style
Default CSS Settings
Typical user-agent styling treats embed as a replaced element:
default.css
embed {
display: inline;
}
Visible size usually comes from the width and height attributes (or CSS). object-fit has no effect; object-position may adjust placement.
Frequently Asked Questions
The embed element places external content in the page. The browser (or a handler it supports) displays the resource pointed to by src, such as an image or a PDF in a built-in viewer.
Yes. It has a start tag only and no end tag. It cannot contain fallback HTML children the way object can.
src (resource URL), type (MIME type), width and height (CSS pixels, not percentages), and title (accessibility label for the embedded content).
No. Modern browsers do not support classic browser plug-ins such as Flash. Prefer video, audio, img, iframe, or object for today’s content.
Use iframe for nested browsing contexts and sandboxed pages. Use object when you need fallback content inside the element. Prefer video/audio for media with native controls.
No. object-fit has no effect on embed. You can use object-position to adjust placement within the frame.