You are here: Reference > HTML > attributes > classid (applet, object)

classid attribute (applet, object)

Browser support:
Sets the class identifier of the embedded application.
A class identifier is a unique registry-identifying component that is used to identify an ActiveX control.
JavaScript page for this attribute: classId. You can find other example(s) there.

Possible values:

String that sets the class identifier for the object.
It can be a clsid, or an URL of a file (Java applet, Python file, ...).
The URL can be an absolute or relative path as well. If a relative path is used and the codeBase attribute of the object is specified, then the relative path is relative to the value of this attribute, else the relative path is relative to the base URL. The base URL is the location of the current document, but it can be overridden by the base tag.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the classid attribute to embed Java applet. Only Internet Explorer supports the clsid in the classid attribute.
<object classid="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA" width="300px" height="100px" 
    <param name="type" value="application/x-java-applet" /> <!-- Opera, Google Chrome and Safari use the type parameter, instead of the clsid -->
    <param name="code" value="HelloWorld.class" />
    <param name="codebase" value="/external/examples/common/java/" />

        <!-- Firefox needs codetype, classid pair in the following form -->
    <object codetype="application/x-java-applet" classid="java:HelloWorld" width="300px" height="100px">
        <param name="codebase" value="/external/examples/common/java/" />
            Your browser does not know how to execute Java applications.
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the classid attribute with Macromedia Flash Player.
It clearly focuses on cross-browser support only, and it isn’t standards-compliant, but there isn't any standards-compliant cross-browser way to embed a Flash application into a document with Flash Player detection.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="120" 
    <param name="movie" value="flash.swf" />
    <!-- Optional params -->
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="quality" value="high" />
    <!-- END Optional -->
    <embed src="flash.swf" width="300" height="120" play="true" 
        loop="true" quality="high" 
        pluginspage="" /> 
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content