Specifying an implementation
The object element is
also commonly used with the classid
attribute for specifying the implementation, such as an ActiveX
control, Java applet, or Python applet. This example shows an object element used to place a Java applet
on a page. (Note that some applets require placement with the applet element for proper
functionality.)
<objectclassid="java:calendar.class"codetype="application/java"standby="Calendar loading..." width="200" height="150" title="basic calendar">...</object>
The Java applet is called with the classid attribute. The optional codetype attribute specifies the content
type of the data that will be downloaded by the classid. A browser may use the value of the
codetype attribute to avoid
downloading information for a content type it does not support. The
optional standby attribute provides
a message to be displayed while the applet is loading.
Some plug-in media and applets require width and height values in order to play correctly, so
be sure to read any documentation provided for your media type. It is
good practice to provide width and height measurements for every
object element.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access