<embed> requests an external resource handled by the browser, such as an image or a PDF viewer. It is void and cannot contain fallback content. Old Flash-style plug-in instructions are not a modern cross-browser solution.
Inspect an embedded resource
The example embeds a self-contained SVG and labels it. Some sandboxed preview or browser policies block embedded viewers; open the copied document directly to inspect that behavior. The description remains available outside the embed.
HTML and CSS
HTML
<p>Resource description: a pale blue rectangle labeled “Embedded illustration.”</p>
<embed src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22240%22%20height%3D%22100%22%3E%3Crect%20width%3D%22240%22%20height%3D%22100%22%20fill%3D%22%23dbeafe%22%2F%3E%3Ctext%20x%3D%2220%22%20y%3D%2255%22%20font-size%3D%2220%22%3EEmbedded%20illustration%3C%2Ftext%3E%3C%2Fsvg%3E" type="image/svg+xml" width="240" height="100" title="Embedded illustration"><p>The description above remains available if the embedded resource cannot display.</p>
</embed>
CSS
embed {
max-width: 100%;
}
Edit HTML or CSS to update the preview as you type. Copy code snippet copies the selected tab. Preview spacing and font defaults are not included.
Attributes and support
Src identifies the resource; type gives its media type. Width and height set dimensions in CSS pixels. Title should identify the embedded content for readers navigating into it. The browser’s resource handler determines the actual interface and supported formats.
Embed does not provide iframe’s sandbox or loading controls. A page’s Content Security Policy may block object resources. Do not assume every user has a PDF viewer or can operate it with their assistive technology.
Prefer purpose-built elements
Use img for ordinary images, video or audio for media controls, and iframe for an HTML document. For a PDF, keep a visible direct link or accessible alternative outside the viewer. Object can contain fallback content, but that also requires testing.
Sources and browser support
MDN: embed describes the syntax and links to the specification and compatibility data. Check individual values in that table when supporting older browsers.