Little Web Hut

HTML 4.01 and XHTML 1.0 Reference: <param> Tag

HTML <param> Tag - Parameter
Syntax HTML syntax - This element does not require a closing tag.
<param>

XHTML syntax - This element is opened and closed, within a single tag, by adding a space followed by a forward slash at the end of the tag.
<param />
Usage The <param> tag is used to supply additional information, when needed, for the <applet> and <object> tags. One or more <param> tags can be used in any order. When used, the <param> tags are the first tags present after the opening <applet> or <object> tag.

The name attribute specifies the name of the parameter and is a required attribute. The value attribute specifies the value of the parameter.

HTML <param> example embedding a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false">
 <param name="stretchtofit" value="true">
 <param name="urmode" value="full">
 <param name="url" value="shiny_button_stream.wmv">
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It HTML Style

XHTML <param> example embedding a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false" />
 <param name="stretchtofit" value="true" />
 <param name="urmode" value="full" />
 <param name="url" value="shiny_button_stream.wmv" />
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It XHTML Style

Content Model The <param> element cannot contain any tags.

<param> Tag Attribute Summary
Required Tag Specific Core Focus Events Language
name type value valuetype id      

<param> Tag Attributes
Attribute Description
nameThe name attribute specifies the name of the parameter.

HTML <param> example using the name attribute. This example embeds a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false">
 <param name="stretchtofit" value="true">
 <param name="urmode" value="full">
 <param name="url" value="shiny_button_stream.wmv">
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It HTML Style

XHTML <param> example using the name attribute. This example embeds a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false" />
 <param name="stretchtofit" value="true" />
 <param name="urmode" value="full" />
 <param name="url" value="shiny_button_stream.wmv" />
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It XHTML Style


Note: This is a required attribute.
typeThe type attribute specifies the content type, or media type, of the resource when the valuetype attribute is set to "ref".
valueThe value attribute specifies the value of the parameter.

HTML <param> example using the value attribute. This example embeds a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false">
 <param name="stretchtofit" value="true">
 <param name="urmode" value="full">
 <param name="url" value="shiny_button_stream.wmv">
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It HTML Style

XHTML <param> example using the value attribute. This example embeds a Windows Media Player.
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04F79faa6"
 width="300" height="265">
 <param name="autostart" value="false" />
 <param name="stretchtofit" value="true" />
 <param name="urmode" value="full" />
 <param name="url" value="shiny_button_stream.wmv" />
 <p>This browser does not support Windows Media Player using the object tag.</p>
</object>
Test It XHTML Style

valuetypeThe valuetype attribute specifies the type of the value attribute. Possible values are "data", "object", and "ref".

"data" = Indicates that the value attribute is a text string. This is the default value.
"object" = Indicates that the value attribute refers to another object within the current web page. The value attribute points to the id attribute of the other object.
"ref" = Indicates that the value attribute is a URL.
idThe id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example

HTML <param> Tag Examples
Test It HTML StyleTest It HTML Style<param> example embedding a Windows Media Player.