HTML classid Attribute

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The classid attribute on <object> named the URL of the implementation that should run the embedded content — often a clsid: ActiveX identifier in Internet Explorer–era pages (Flash, media players, and similar plugins).

For new work, use data and type. Related obsolete siblings include codebase, archive, and codetype. Do not confuse it with the global class attribute.

Deprecated / Obsolete.

Do not use classid on <object>. The HTML living standard lists it as obsolete — prefer data and type. Learn it to read legacy markup, not to ship it.

HTML Syntax

syntax.html
<object classid=" URL">

Historically a URL or clsid:… identifier naming the component implementation.

Attribute Values

What authors historically put in classid:

ValueDescriptionTry it
clsid:…ActiveX-style class ID (IE plugin era)Try it
Implementation URLPath naming the object’s implementation resourceTry it
Modern alternativeOmit classid; use data + type (+ fallback)Try it

Live Preview

Toggle a legacy classid value on a sample <object>. Modern browsers will not load ActiveX/plugins — this demo only shows the attribute.

Legacy study demo. Prefer data and type on <object> in real projects.

Object (fallback shown)

Fallback: the object implementation cannot be displayed (expected in modern browsers).

HTML Examples

Legacy snippets for study, plus the modern pattern. Use Try It Yourself for a live editor.

Example 1 — ActiveX-Style classid (Legacy)

Old IE pages often pointed classid at a clsid: GUID for a plugin.

HTML
<object
  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  width="320"
  height="240">
  <p>Your browser cannot display this object.</p>
</object>
Try It Yourself

How It Works

  1. object embeds external content via a plugin host.
  2. classid named which component implementation to load.
  3. Fallback inside <object> shows when the plugin is missing.
  4. Study only — never ship this in new sites.

Example 2 — classid with codebase (Legacy)

Some pages combined an implementation ID with a download base URL.

HTML
<object
  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="/plugins/"
  width="320"
  height="240">
  <param name="movie" value="intro.swf">
  <p>Plugin content is unavailable.</p>
</object>
Try It Yourself

How It Works

  1. classid selected the component.
  2. codebase hinted where to fetch related plugin files.
  3. param passed name/value settings into the plugin.
  4. All of this is obsolete in the living standard.

Example 3 — Modern Object Without classid

What the living standard recommends: data + type, with clear fallback text.

HTML
<object data="/media/report.pdf" type="application/pdf">
  <p>
    PDF preview is unavailable.
    <a href="/media/report.pdf">Download the report</a>.
  </p>
</object>
Try It Yourself

How It Works

  1. No classid — obsolete plugin attributes are omitted.
  2. data + type describe the resource the browser should load.
  3. Fallback keeps the page usable when embed fails.
  4. Use this pattern for new <object> embeds.

Edge Cases & Pitfalls

Treat classid as historical — ActiveX and NPAPI plugins are gone from the modern web.

obsolete

Not for new HTML

Validators flag classid on <object>. Remove it when you modernize templates.

vs class

Unrelated to CSS class

class styles and scripts elements. classid was a plugin implementation URL — different attribute entirely.

param

Named classid parameter

Old guidance: if a plugin needed a parameter named classid, use <param> — still not a reason to ship plugins today.

security

Plugins were a security risk

Browsers removed plugin APIs for good reason. Do not reintroduce ActiveX/Flash patterns.

family

Same fate as archive / codebase

archive, codebase, code, and codetype on object are obsolete too — same replacement: data + type.

Browser Support

classid is a legacy HTML attribute for plugin implementations. Engines may still parse it, but ActiveX/NPAPI plugins no longer run.

✓ Deprecated · Obsolete

classid

Recognized in old documents for compatibility. Modern browsers do not execute ActiveX or Flash via classid. Prefer data and type on object.

Legacy Parse only
Google Chrome Ignored for plugins
Obsolete*
Mozilla Firefox Ignored for plugins
Obsolete*
Apple Safari Ignored for plugins
Obsolete*
Microsoft Edge Ignored for plugins
Obsolete*
Opera Ignored for plugins
Obsolete*
Samsung Internet Ignored for plugins
Obsolete*
Internet Explorer ActiveX era
Legacy*
classid Obsolete (do not use)

Bottom line: *Parsed for old pages at best — not recommended. Do not build new features on classid or plugins.

Key Takeaways

  • Role: named the plugin/component implementation for <object>.
  • Status: obsolete — keep for reading legacy HTML only.
  • Replace with: data + type on <object>, plus fallback content.
  • Not CSS class — different attribute, different purpose.

One line: learn classid for old plugin markup — ship data and type instead.

Frequently Asked Questions

On object, classid named the URL (often a clsid: ActiveX identifier) of the plugin or component implementation used to run the embedded content.
Yes. The HTML living standard marks classid on object as obsolete. Authors must not use it. Prefer data and type.
The object element. It was part of the old plugin / ActiveX embedding model.
Use object with data (resource URL) and type (MIME type). If a plugin needed a parameter named classid, the old advice was a param element — plugins themselves are obsolete in modern browsers.
No. class is a global CSS/JS hook. classid was a legacy object implementation URL, unrelated to CSS classes.
Yes for reading old markup (Flash/ActiveX pages). Do not use it in new projects.

Next: codebase

Obsolete base URL for applet/object resource files.

codebase tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful