HTML <param> Tag
The <param> tag passes parameters to embedded objects, specifically the <object> and <applet> elements. The <param> tag configures the behavior of these elements using name and value attribute pairs.
More than one <param> tag can be used inside an <object> element. Each must include name and value attributes and must be placed before any other content within the <object>.
Syntax
The <param> tag is empty, which means that the closing tag isn’t required. But in XHTML, the <param> tag must be self-closing (<param />).
HTML <param> Tag
<object>
<param name="..." value="...">
</object>Example of the HTML <param> Tag
<!DOCTYPE html>
<html>
<head>
<title>The title of the document</title>
</head>
<body>
<p>Embedded object example</p>
<object width="320" height="240" data="example.pdf">
<param name="quality" value="high">
</object>
</body>
</html>Example of the HTML <param> Tag with the "name" and "value" Attributes
<!DOCTYPE html>
<html>
<head>
<title>The title of the document</title>
</head>
<body>
<p>Embedded object example</p>
<object width="320" height="240" data="example.pdf">
<param name="param1" value="value1">
</object>
</body>
</html>Attributes
| Attribute | Value | Description |
|---|---|---|
| name | name | Specifies the name of the parameter. Required. |
| value | value | Specifies the value of the parameter. Required. |
| type | media_type | Specifies the MIME type of the value. Not supported in HTML5. |
| valuetype | data, object, ref | Specifies the type of the value. Not supported in HTML5. |
The <param> tag only supports the name and value attributes in HTML5.
Note: The
<param>tag is largely considered legacy. Modern web development typically uses JavaScript to configure embedded media or objects, and the<applet>element is deprecated.
Practice
What is the functionality of HTML <param> tag and where is it used?