HTML <param> attribute is employed for transferring parameters to the object integrated through the <object> tag.
We have the flexibility to include multiple <param> tags within an <object> element in varying sequences. However, it is essential that each tag consists of both a name and value attribute and is positioned at the beginning of the content.
The <param> attribute manages the functionality of the <object> element by utilizing various name-value pairs like autoplay, controller, and more.
Syntax
<param name=" " value="">
Following are some details regarding the HTML <param> element:
| Display | Inline |
|---|---|
| Start tag/End tag | Empty Tag(End tag forbidden) |
| Usage | Programming |
Example
<!DOCTYPE html>
<html>
<head>
<title>Param Tag</title>
</head>
<body>
<h2>Example of Param Tag</h2>
<object data="https://www.youtube.com/embed/JHq3pL4cdy4" >
<param name="controller" value="true">
</object>
</body>
</html>
Output:
Attribute:
Tag-specific attributes:
| Attribute | Value | Description |
|---|---|---|
Name |
text | It determines the name of the parameter. |
| value | text | It determines the value of the parameter. |
type |
content_type | It specifies the media type of the parameter, and it only used if the valuetype is set to "ref." (Not Supported in HTML5) |
| valuetype | datarefobject | It determines the type of the value attribute. (Not Supported in HTML5) |
- data
- object
Global attribute:
HTML <param> element enables the use of universal attributes within an HTML document.
Event attribute:
HTML <param> tag enables the utilization of event attributes within HTML.
Supporting Browsers
| Element | Chrome | IE | Firefox | Opera | Safari |
|---|---|---|---|---|---|
<param> |
Yes | Yes | Yes | Yes | Yes |