The <param> tag in HTML is used to define a parameter for plug-ins that are associated with <object> element. It does not contain the end tag. The <param>
tag also supports the Global Attributes and Event Attributes in HTML. Ensure the sound plays automatically by setting the “autoplay” parameter to “true”.
Syntax:
<param name=" " value=" ">
<object data="horse.wav" type="audio/wav">
<param name="autoplay" value="true">
</object>
Note: The <param> tag is not supported in HTML5.
Attributes:
Attribute Values |
Description |
---|---|
It is used to specify the name of the parameter. |
|
It is used to specify the value of the parameter. |
|
It is used to specify the media type. |
|
valuetype |
It is used to specify the type of the value. |
Example 1: In this example, we will see the implementation of param tag with an example.
<!DOCTYPE html> < html >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >HTML param Tag</ h2 >
content/uploads/20210209234048/
InShot_20210209_233841711.mp4">
< param name = "video"
value = "play" >
</ object >
</ body >
</ html >
|
Output:
Example 2: In this example, we will see the implementation of param tag with another example.
<!DOCTYPE html> < html >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >HTML param Tag</ h2 >
wp-content/cdn-uploads/20200430164710/
captured_voice.mp3">
< param name = "video" value = "play" >
</ object >
</ body >
</ html >
|
Output:
Supported Browsers:
- Google Chrome 1
- Edge 12 and above
- Firefox 1 and above
- Opera 15 and above
- Safari 4 and above