<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

AttributeValueDescription
namenameSets the name of the parameter. Is used with value attribute
typemedia_typeSpecifies the media type of the parameter
Not supported in HTML5.
valuevalueSets the value of the parameter. Is used along with name attribute.
valuetypeSets the type of the value
dataThe value is passed to the object’s implementation as a string (default value) .
objectAn ID of another <object> in the same document
refThe 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.



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部