The <param> element

While some object types are inherently simple and can be handled using the basic <object> syntax, others are more complex and require more configuration than the basic syntax can provide. The <param> element is a generic element which allows the <object> element to feed configuration information to the object, or more strictly the object handler in the browser. The <param> elements are contained inside the <object> element.

The syntax for the <param element is:

<param name="xxx" value="yyyyy" />

'xxx' is replaced by the name of the parameter and 'yyyyy' is replaced by the value you want to specify for the parameter. An example of this is when using <object> to display a video file. The following code shows how <object> can be used to display a Windows Media Video (WMV) file:

<object type="video/x-ms-wmv" data="resources/IceScraping.WMV"
        width="320" height="285">
  <param name="src" value="resources/IceScraping.WMV" />
  <param name="autoStart" value="0" />
  <param name="showControls" value="1" />
  <p>Cannot play WMV files!</p>
</object>

The 'autoStart' and 'showControls' parameters are used to control the media player. The 'src' parameter is used by some browsers to locate the actual video to be played. Note: Firefox does not need the 'src' parameter, but since the code needs to work in all browsers it should be included.

Resulting in:

Cannot play WMV files!

In general you should always carefully research the required parameters for a particular content type. See the demonstration page for simple object syntax with parameters for a range of content types.

Note: The parameters that are required my vary, based on the actual plug-in used to display the embedded content. Since the web-page author doesn't have control of the end users environment this makes it difficult to produce a foolproof page for some media types. For example, the playback of MP3 files can be done using the Quicktime plug-in or the Windows Media Player plug-in on a Windows machine. Quicktime uses 'true' and 'false' for boolean values, where Media Player uses 1 and 0.

Valid XHTML 1.0! | Valid CSS! | WCAG Approved AA
Page design by: John P Scott - Hosting with: Netcetera