The <param>
tag adds a parameter to an <object> element.
Use the name and value attributes to assign parameter values.
A <param>
tag that enables the object's autoplay value.
<object data="/media/sample.wav">
<param name="autoplay" value="true">
</object>
param
= parameter
Tip: Don't use <object> element to play audio. Use the <audio> tag instead.
The <param>
tag assigns parameters to an <object> element.
It uses the name and value attributes to assign parameter values.
The <param>
element is self closing and does not use an end tag.
Tip: Chrome and Edge don't fully support the param element which makes configuring the object element difficult. It is usually best to use an alternative to object, such as audio, video, iframe, picture, or img.
A <param>
element.
It sets the resource's media type to application/pdf.
<object data="/media/contract.pdf" style="width:100%;height:450px;" >
<param name="type" value="application/pdf" />
</object>
This table lists the <param>
tag attributes.
Attribute | Value | Description |
---|---|---|
name | name | Name of the parameter |
value | value | Value of the parameter |
id | identifier | Defines a unique identifier for the param. |
For additional global attributes see our global attributes list.
Do not use the attributes listed below. They are no longer valid on the param tag in HTML5.
Attribute | Description | Alternative |
---|---|---|
type |
Specifies the media type if valuetype is ref. | n/a |
valuetype |
Specifies the type of the value: data, ref, or object. | n/a |
Here is when <param>
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |