<param> Tag in HTML
The <param> tag in HTML is used to define parameters for plugins embedded in a webpage, such as Flash, Java applets, or other multimedia objects. It provides a way to pass data or settings to these embedded objects, allowing them to function according to the specified parameters. It is typically used within the <object> tag to define the properties of the object being embedded.
Key Points on <param> Tag:
- The <param> tag is used inside the <object> tag to pass parameters to embedded objects.
- The name attribute specifies the name of the parameter, while the value attribute specifies the value of the parameter.
- It can be used for Flash objects, Java applets, and other media content that requires configuration or customization.
- It is not used for modern web content, as many plugins have been replaced by HTML5 native elements (like <video> and <audio>).
- Multiple <param> tags can be used to specify different properties for the same embedded object.
Syntax of <param> Tag:
Syntax Example
<object data="object_url" type="object_type">
<param name="parameter_name" value="parameter_value">
</object>
Example of <param> Tag in HTML:
This example demonstrates how the <param>
tag is used to define parameters for an embedded Flash object.
Code Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML <param> Tag Example</title>
</head>
<body>
<h1>Embedding Flash Content</h1>
<object data="flash_animation.swf" type="application/x-shockwave-flash">
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="quality" value="high">
</object>
</body>
</html>
Output
The <param>
tag was once a vital part of embedding interactive content like Flash and Java applets in a webpage. Though its use has decreased with the rise of modern web standards like HTML5, it remains important for legacy content. The <param> tag is used to pass settings and configurations to embedded objects, making them more flexible and customizable.