W3docs

HTML <param> Tag

The deprecated HTML <param> tag passed named parameters to plug-ins embedded with <object>. Learn what it did and its modern replacements.

Deprecated / obsolete. The <param> tag is no longer part of the HTML standard and should not be used in new pages. It existed only to configure browser plug-ins, and the plug-in technology it served (Flash, Java applets, QuickTime, Silverlight) has been removed from every modern browser. This page is kept for reference and for understanding legacy code.

The <param> ("parameter") tag passed named configuration values to a plug-in that was embedded with the <object> element. Each <param> supplied one setting as a name/value pair — much like a key/value argument handed to the plug-in when it loaded.

<object data="movie.swf" type="application/x-shockwave-flash">
  <param name="quality" value="high">
  <param name="bgcolor" value="#ffffff">
</object>

You could place more than one <param> inside an <object>. Each one needed name and value attributes, and all of them had to come before any fallback content (the text or markup shown when the object failed to load).

Why it existed: plug-ins and the NPAPI

Before browsers had native media and rich-application support, interactive content — video players, games, document viewers — ran inside external plug-ins through an interface called NPAPI (Netscape Plugin Application Programming Interface). The most common examples were Adobe Flash, Java applets, Microsoft Silverlight, and Apple QuickTime.

The page embedded the plug-in with <object> (or the now-removed <applet> element), and <param> was the only way to pass startup options into it. For a Flash movie you might set quality, bgcolor, loop, or a flashvars string; for a Java applet you might pass a code path or applet-specific settings.

Caveat: <param> was also used inside <applet>, but <applet> was removed from HTML entirely — it is not just deprecated, it has no defined behavior in modern browsers.

Browsers began disabling NPAPI plug-ins around 2015 and removed them completely soon after; Adobe ended Flash support at the end of 2020. With no plug-ins left to configure, <param> no longer has anything to do.

Important: <param> was never valid inside <video> or <audio>. Those elements configure themselves through their own attributes and through <source> and <track> child elements — not through <param>.

Modern alternatives

Almost everything plug-ins once did now has a native HTML or web-platform replacement:

  • Video and audio — use the native <video> and <audio> elements with their own attributes (controls, autoplay, loop, muted) and <source>/<track> children.
  • Interactive apps and games — built with HTML, CSS, JavaScript, Canvas, WebGL, or WebAssembly.
  • Embedding other documents — use <object>, <iframe>, or <embed>.
  • Passing configuration to an embed — set data-* attributes on the element (or the embedding <iframe>'s query string) and read them with JavaScript, instead of using <param>.
<!-- The modern equivalent of "configuring an embed": data-* + JavaScript -->
<div id="player" data-autoplay="true" data-volume="0.5"></div>

<script>
  const el = document.getElementById('player');
  const autoplay = el.dataset.autoplay === 'true';
  const volume = parseFloat(el.dataset.volume);
  // initialize your player with autoplay and volume...
</script>

Syntax

The <param> tag is empty, which means that the closing tag isn’t required. But in XHTML, the <param> tag must be self-closing (&lt;param /&gt;).

HTML <param> Tag

<object>
  <param name="..." value="...">
</object>

Example of the HTML <param> Tag

<!DOCTYPE html>
<html>
  <head>
    <title>The title of the document</title>
  </head>
  <body>
    <p>Embedded object example</p>
    <object width="320" height="240" data="movie.swf" type="application/x-shockwave-flash">
      <param name="quality" value="high">
    </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>Embedded object example</p>
    <object width="320" height="240" data="example.pdf">
      <param name="param1" value="value1">
    </object>
  </body>
</html>

Attributes

AttributeValueDescription
namenameSpecifies the name of the parameter. Required.
valuevalueSpecifies the value of the parameter. Required.
typemedia_typeThe MIME type of the value. Obsolete — only ever used when valuetype was ref, to tell the plug-in what kind of resource the referenced URL pointed to.
valuetypedata, object, refHow the plug-in should interpret value. Obsolete.

Only name and value were carried into HTML5; type and valuetype were dropped.

About type and valuetype

These two attributes never did anything on their own — they only described how the plug-in should read the value. The valuetype attribute had three possible settings:

  • data (the default) — value is a plain string passed straight to the plug-in.
  • refvalue is a URL pointing to a resource the plug-in should load. In this case type told the plug-in the MIME type of that resource.
  • objectvalue is the id of another <object> on the page.

Because plug-ins no longer exist, none of these have any effect today. They are documented here only so you can recognize them in old code.

Note: Treat the <param> tag as historical. New pages should use native <video> / <audio>, standard embedding with <object> or <iframe>, and data-* attributes read by JavaScript to configure an embed.

Practice

Practice
What did the (now deprecated) HTML param tag do?
What did the (now deprecated) HTML param tag do?
Was this page helpful?