Add a Parameter for an Object in HTML



How to Add a Parameter for an Object in HTML


The <param> tag is used to define a parameter of an HTML element. The <param> tag does not contain a closing tag. The <param> tag supports all browsers, but the file format defined in an object may not support it. It also supports the global and event attributes in HTML. Below is the syntax ?

<param name=" "  value=" ">
The <param> tag is deprecated and is no longer recommended. While some browsers might still support it, it has been removed from the relevant web standard and is only maintained for compatibility. Avoid using it.

Attribute of <param> Tag

The <param> tag accepts the following attributes ?

  • name ? The name attribute in param tag used to specify the name of the parameter.
  • value ? The value attribute in param tag is used to specify the value of the parameter.
  • type ? The type attribute in param tag is used to specify the media type.
  • valuetype ? The valuetype attribute is used to specify the type of the value.

Example: Add Parameter for an Object

In this example, we demonstrates how to add an parameter for an object in HTML ?

<!DOCTYPE html>
<html>
<body>
   <h1>Welcome To TutorialsPoint</h1>
   <h2>Demonstration of param Tag</h2>
   <object data= "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4">
      <param name="video" value="play">
   </object>
</body>
</html>

Example

In the following example, we insert an image using the <object> tag and add a parameter to it using the <param> tag ?

<!DOCTYPE html>
<html>
<body>
   <h1>TutorialsPoint</h1>
   <h2>How to add a parameter for an object in HTML </h2>
   <object data="https://www.tutorialspoint.com/static/images/logo.png?v2">
      <param name="autoplay" value="true">
   </object>
</body>
</html>

Example

Here, in this example <param> tag is used to provide additional information to the flash object ?

<!DOCTYPE html>
<html>
<body>
   <object data="movie.swf" type="application/x-shockwave-flash" width="400" height="300">
     <param name="movie" value="movie.swf">
     <param name="quality" value="high">
     <p>Your browser does not support the object tag.</p>
   </object>
</body>
</html>
Updated on: 2025-04-09T12:04:44+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements