The <param>
tag is used to pass parameters to plugins or embedded objects within the <object>
element. It allows you to configure or customize the behavior of embedded content like multimedia players, Java applets, or Flash objects.
📌 What Is the <param>
Tag?
- The
<param>
tag defines parameters (name-value pairs) for an<object>
element. - It does not display content itself but sends data to the embedded object.
- Must be a child of
<object>
; cannot stand alone.
✅ Basic Syntax
<object data="movie.swf" type="application/x-shockwave-flash" width="400" height="300">
<param name="autoplay" value="true">
<param name="loop" value="false">
Your browser does not support embedded objects.
</object>
🧩 Structure Diagram
<object>
├── <param name="autoplay" value="true">
├── <param name="loop" value="false">
└── Fallback content
</object>
🔧 Attributes of <param>
Attribute | Description |
---|---|
name | The parameter’s name (e.g., “autoplay”) |
value | The parameter’s value (e.g., “true”, “5”) |
🧪 Example: Configuring a Video Player
<object data="video-player.swf" type="application/x-shockwave-flash" width="640" height="360">
<param name="src" value="movie.mp4">
<param name="autoplay" value="false">
<param name="volume" value="80">
<p>Your browser does not support embedded video.</p>
</object>
The <param>
tags pass settings such as the video source, autoplay behavior, and volume to the Flash player.
⚠️ Important Notes
- The
<param>
tag is only valid inside an<object>
. - It is mostly used with legacy plugins like Flash or Java, which are now deprecated or unsupported in modern browsers.
- For modern media embedding, use
<video>
,<audio>
, or<iframe>
instead. - The
<param>
tag itself is void — it has no closing tag.
📜 Usage Today
- While
<param>
was critical for Flash and other plugins, modern web development rarely uses it. - Many browsers no longer support the plugins that rely on
<param>
. - It remains part of HTML for backward compatibility and embedding custom objects.
🏁 Summary
The <param>
tag provides a way to send configuration parameters to embedded objects via the <object>
element. Though largely legacy, understanding <param>
is useful for maintaining older codebases or working with specialized embedded content.