Sets the MIME type (media type) of the application that should be used by the object element.

If you don't specify this attribute, browsers try to determine the application that can be used for the data of the object element.
Generally, you don't need to specify this attribute, leaving the choice to the browser.

Use the type attribute, if you want to specify the MIME type of the contents.

JavaScript page for this attribute: codeType. You can find other example(s) there.

Possible values:

String that sets the media type. See the page for the MIME types for more information.

Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the codeType attribute. The classid attribute specifies the HelloWorld.class file to play and the codeBase parameter sets the path to the HelloWorld.class file. Internet Explorer, Google Chrome and Safari do not support the classid attribute in this form.

Code

HelloWorld.java

<objectcodetype="application/x-java-applet"classid="java:HelloWorld"width="300px"height="100px"><paramname="codebase"value="/external/examples/common/java/"/>
Your browser does not support Java applications in this form.
</object>