HTML Plug-ins
Older HTML had a slot for browser plugins — Flash, Java applets, Silverlight. Modern HTML5 has replaced almost all of them, but the elements still exist for backwards compatibility.
Plugin elements
| Element | Original purpose | Today |
|---|---|---|
<object> | Embed any plugin or external resource. | Still useful for embedding PDFs and SVGs. |
<embed> | Embed plugin content (Flash, PDF…). | Avoid — replaced by HTML5 native elements. |
<param> | Pass options to a plugin in <object>. | Rarely needed today. |
<applet> | Java applets. | Removed from HTML5. Don't use. |
What replaced what
- Video: use
<video>instead of Flash. - Audio: use
<audio>instead of Flash. - Vector animation: use SVG plus CSS / JavaScript.
- Interactive 2D drawing: use
<canvas>. - 3D: use WebGL or WebGPU.
Note: Flash was deprecated and removed from all major browsers by 2021. If you find a page still using
<embed> for Flash content, that content no longer plays.Example
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Plug-ins</title>
</head>
<body>
<h1>HTML Plug-ins</h1>
<p>This is a demo page for the "HTML Plug-ins" lesson.</p>
</body>
</html>
Try it Yourself »
Exercise
Use the modern embed tag for a generic external resource.
<
src="/widget.html" type="text/html" width="400" height="300">
Five letters; replaces the old Flash <object>.
Discussion
Loading…