Plugin Embedding (Legacy)
Before <video>, <audio>, and <iframe> sandbox, <object> and <embed> were the only ways to load third-party plugins. Both are deprecated in modern usage but still appear in legacy systems — and <object> has a second life for SVG with fallback.
<object> with Fallback
The <object> element tries to load its data; if the plugin isn't available, the child content renders instead.
<param> — Plugin Configuration
Inside <object>, <param> passes named configuration values to the plugin. It's a void element — no closing tag.
<object data="player.swf" type="application/x-shockwave-flash">
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="quality" value="high">
<param name="wmode" value="transparent">
Fallback content here.
</object>
Modern Replacements
| Legacy | Use Instead |
|---|---|
<object> (video) | <video> |
<embed> (audio) | <audio> |
<object> (external page) | <iframe sandbox> |
<embed> (SVG) | <svg> inline or <img> |
| PDF plugins | <iframe src="doc.pdf"> or direct download link |
You'll still see these elements in government intranets, old CMS templates, and Flash-era embed code generators. New projects should reach for the semantic elements first — <object> with type="image/svg+xml" being the rare exception that's still useful today.