HTML classid Attribute
The obsolete HTML classid attribute was historically used with the <object> element to identify the implementation or program that should be used to display or run embedded content.
classid attribute is obsolete and should not be used in modern HTML. Use modern HTML elements and supported web technologies appropriate for the type of content being embedded.
Historical Syntax
The classid attribute was placed on an <object> element and assigned an identifier for the implementation needed to handle the embedded object:
<object classid="clsid:implementation-identifier">
Alternative content
</object>
One historical use involved identifiers beginning with clsid:, which could identify an ActiveX control on systems that supported that technology.
Historical Elements
The classid attribute was historically associated with the <object> element.
| Element | Historical Purpose |
|---|---|
<object> |
Identified the implementation that should be used for an embedded object. |
Historical Use
The classid attribute came from an era when webpages often depended on external programs, browser plug-ins, and platform-specific controls to provide functionality that browsers could not provide themselves.
For example, older webpages could use an <object> element with a classid value to request a particular ActiveX control. The browser and operating system then determined whether the identified implementation was available.
This approach made embedded content dependent on specific browser technologies, installed software, or operating systems and was therefore not reliably portable across browsers and devices.
Why It Became Obsolete
The classid attribute depended on older plug-in and component technologies that are no longer part of modern web development. Modern browsers provide native support for many types of media and interactive content that once required external software.
Modern HTML also provides purpose-specific elements such as <audio>, <video>, and <iframe>. When the <object> element is appropriate, modern HTML uses attributes such as data and type rather than classid.
Modern Alternative
There is no single direct replacement for the obsolete classid attribute. The correct modern approach depends on the type of content that needs to be embedded.
When using the modern <object> element, the data attribute can specify the resource and the type attribute can identify its MIME type:
<object data="document.pdf" type="application/pdf">
<p>Your browser cannot display the PDF document.</p>
</object>
For audio or video, use the corresponding HTML media element rather than relying on an external plug-in:
<video controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
Other embedded content may use an <iframe> or another modern web technology. The appropriate element should be selected according to the type and purpose of the content rather than attempting to replace classid with a single attribute.
Legacy Browser Support
The classid attribute was associated with older object and plug-in systems. Some of its historical uses were particularly associated with Microsoft Internet Explorer and technologies such as ActiveX.
Modern browsers should not be expected to provide the legacy plug-in or component environment required by old classid implementations. Older webpages that depend on these technologies generally need to be redesigned using current HTML and web platform features.
For additional information about historical browser compatibility, visit Can I Use? . Search for the HTML element or attribute you want to check. Search results can include related HTML features, element attributes, APIs, and other technologies, so select the result that most closely matches the legacy feature you are researching.
Related Attributes
Other obsolete HTML attributes historically associated with embedded objects and external implementations include:
codebase- Historically used to specify a base location for object-related resources.codetype- Historically used to specify the content type of code associated with an object.archive- Historically used to specify archives containing resources associated with an object or applet.declare- Historically used to declare an object without immediately instantiating it.standby- Historically used to provide a message while an object was loading.
Specifications
The classid attribute is obsolete in modern HTML and should not be used for embedded content. See the WHATWG HTML Living Standard for information about obsolete and non-conforming features.
