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

If you don't specify this property, 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 property, leaving the choice to the browser.

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

Syntax:

Possible values:

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

Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the codeType attribute. The classid property 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 property 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>