<param>
HTML <param> Tag
The <param> tag passes the parameters to the objects (Java applets or multimedia content) embedded with the <applet>, <object>, <audio> and <video> elements. The <param> tag regulates the behaviour of the <object> tag with different pair of the name of value attributes, like controller, autoplay, etc.
More than one <param> tag can be used inside of an <object> element, but each of them should include name and value attribute and must be placed at the beginning of the content.
Syntax
Syntax
The <param> tag is empty, which means that the closing tag isn’t required. But in XHTML, the (<param>) tag must be closed (<param/>).
<[applet | object | audio | video]>
...
<param name="..." value="...">
...
</[applet | object | audio | video]>
Example of the HTML <param> tag:
<!DOCTYPE html>
<html>
<head>
<title>The title of the document</title>
</head>
<body>
<p>Steve Jobs' Commencement address at Stanford</p>
<object width="320" height="240" data="https://www.youtube.com/embed/bZNEB_o3Hzw?ecver=2"
<param name="autoplay" value="true">
</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>Steve Jobs' Commencement address at Stanford</p>
<object width="320" height="240" data="https://www.youtube.com/embed/bZNEB_o3Hzw?ecver=2"
<param name="video" value="play">
</object>
</body>
</html>
Attributes
Attributes
Attribute | Value | Description |
---|---|---|
name | name | Sets the name of the parameter. Is used with value attribute |
type | media_type | Specifies the media type of the parameter |
Not supported in HTML5. | ||
value | value | Sets the value of the parameter. Is used along with name attribute. |
valuetype | Sets the type of the value | |
data | The value is passed to the object’s implementation as a string (default value) . | |
object | An ID of another <object> in the same document | |
ref | The value is a URI to a resource where run-time values are stored. | |
Not supported in HTML5. |
The <param> tag also supports the Global attributes and the Event Attributes.