The <APPLET> Tag
Applets
are embedded in HTML documents with
the <APPLET> tag. The
<APPLET> tag resembles the HTML
<IMG> image tag. It contains attributes that
identify the applet to be displayed and, optionally, give the web
browser hints about how it should be displayed.[50] The standard image tag sizing and alignment attributes,
such as height and width, can be used inside the applet tag. However,
unlike images, applets have both an opening
<APPLET> and a closing
</APPLET> tag. Sandwiched between these can
be any number of
<PARAM>
tags that contain data to be passed to the applet:
<APPLETattributeattribute... > <PARAMparameter> <PARAMparameter> ... </APPLET>
Attributes
Attributes are name/value pairs that
are interpreted by a web browser or
appletviewer. (Many HTML tags besides
<APPLET> have attributes.) Attributes of the
<APPLET> tag specify general features that
apply to all applets, such as size and alignment. The definition of
the <APPLET> tag lists a fixed set of
recognized attributes; specifying an incorrect or nonexistent
attribute should be considered an HTML error.
Three
attributes are required in the <APPLET> tag.
Two of these attributes, width and
height, specify the space the applet occupies on
the screen. The third required attribute may be either
code
or object; you must
supply one of these attributes, and you can’t specify both. The
code attribute specifies the class file from which
the applet is loaded;
the
object attribute specifies a serialized ...
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