<embed>: The EMBED Element
Last updated: 2026-10-13
<embed>The EMBED Element
A void element embedding external resources (plugins, SVG, PDF); a simplified object, largely superseded.
| Category | Scripts & Embedding |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Self-closing — no closing tag needed |
| Status | Standard |
📝 Syntax
<embed src="game.swf" type="application/x-shockwave-flash">
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
src | URL of the resource to embed. | |
type | MIME type of the resource. | |
width | Width of the embedded area. | |
height | Height of the embedded area. |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <embed> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: embed is a void element; prefer iframe/object in modern code, embed is for legacy plugins.
❓ FAQ
QIs embed still used today?
ARarely. It is a leftover from the plugin era (Flash, PDF plugins). HTML5 standardized it as an external-content embed point, but modern needs map to
<video>, <audio>, and <iframe> (or native PDF viewing) — embed survives as a compatibility shim.QWhat is the difference between embed and object?
ABoth embed external resources:
<object> is the fuller element (fallback children, type declaration) while <embed> is the historical self-closing shorthand. New projects should prefer object or the modern dedicated elements; embed only appears when integrating legacy systems.QIs embedding PDF with embed reliable?
AIt works but is not recommended: rendering varies across browsers and mobile support is weak.
<iframe src='file.pdf'> or <object type='application/pdf'> is steadier, and a download link as fallback is the most reliable.🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.