<param>
Defines parameters for an object element
Definition and Usage
The <param> tag is used to define parameters for an <object> element.
The <param> tag is a void element (it does not have a closing tag) and must be placed inside an <object> element.
Note: The
<param> tag is rarely used in modern web development. Most use cases have been replaced by the <video> and <audio> tags.
Deprecated: Flash and many other plugins that used
<param> are now obsolete. Modern browsers have removed support for most plugins.
Browser Support
The <param> tag is supported in all major browsers:
Chrome
Yes
Firefox
Yes
Safari
Yes
Edge
Yes
Opera
Yes
Attributes
| Attribute | Value | Description |
|---|---|---|
| name | text | Specifies the name of the parameter |
| value | text | Specifies the value of the parameter |
| type | media_type | Deprecated in HTML5. Specifies the media type of the parameter |
| valuetype | data ref object |
Deprecated in HTML5. Specifies the type of the value |
Examples
Basic Object with Parameters
Define parameters for an embedded object:
Example
<object data="movie.swf" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="bgcolor" value="#ffffff">
</object>
Note: Flash is obsolete and no longer supported by modern browsers. This example is for historical reference only.
Flash Movie Parameters (Deprecated)
Configure Flash movie playback (no longer recommended):
Example
<object width="400" height="300" data="animation.swf">
<param name="movie" value="animation.swf">
<param name="quality" value="high">
<param name="play" value="true">
<param name="loop" value="false">
<param name="wmode" value="transparent">
</object>
Video Object with Parameters
Embed video using object element:
Example
<object data="video.mp4" type="video/mp4">
<param name="autoplay" value="false">
<param name="controller" value="true">
Your browser does not support the video tag.
</object>
Audio Object with Parameters
Embed audio using object element:
Example
<object data="music.mp3" type="audio/mpeg">
<param name="autoplay" value="false">
<param name="volume" value="50">
Your browser does not support this audio format.
</object>
PDF Object Parameters
Embed a PDF document with parameters:
Example
<object data="document.pdf" type="application/pdf" width="600" height="400">
<param name="page" value="1">
<param name="zoom" value="100">
<p>Your browser does not support PDFs.
<a href="document.pdf">Download the PDF</a>.</p>
</object>
Multiple Parameters
Set multiple parameters for complex objects:
Example
<object data="player.swf" width="320" height="240">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="flashvars" value="video=myvideo.mp4&autoplay=false">
<param name="quality" value="high">
</object>
Modern Alternatives
Instead of using <object> and <param>, use modern HTML5 elements:
Use <video> Instead
Example
<video width="400" height="300" controls>
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm">
Your browser does not support the video tag.
</video>
Use <audio> Instead
Example
<audio controls>
<source src="music.mp3" type="audio/mpeg">
<source src="music.ogg" type="audio/ogg">
Your browser does not support the audio tag.
</audio>
Try it Yourself
Interactive Example
The <param> tag is rarely used today. Here's a modern alternative using the <audio> tag:
Best Practices
- The
<param>tag is rarely used in modern web development - Always prefer
<video>and<audio>tags over<object> - Flash and most browser plugins are obsolete and should be avoided
- Each
<param>must be a direct child of an<object>element - The
<param>tag is self-closing and does not have a closing tag - Provide fallback content inside the
<object>for unsupported browsers - Use modern HTML5 APIs for multimedia instead of deprecated plugins
HTML Free Codes