Little Web Hut

HTML 4.01 and XHTML 1.0 Reference: <applet> Tag

This element has been deprecated.
HTML <applet> Tag
Syntax This element uses separate opening and closing tags.
<applet>...</applet>
Usage The <applet> tag is used to embed a Java applet into the web page. The content that is placed between the opening and closing tags serves as alternate information that can be displayed by browsers that do not support the <applet> tag, or for browsers that that have this feature disabled. This tag has been deprecated and can be replaced using the <object> tag.

The <applet> tag must use either the code attribute or the object attribute.

<applet> example:
<applet code="swimmingfish.class" height="200" width="200">Swimming Fish</applet>


Alternative example using the <object> tag as a replacement for the <applet> tag:
<object codetype="application/java" classid="java:swimmingfish.class"
height="200" width="200">Swimming Fish</object>
Content Model The <applet> element can contain the following tags, and Text, between its opening and closing tags.Notes:
1. The <applet> element can contain the <iframe> tag when using DTD Transitional and Frameset documents but not Strict documents.
2. The <applet> element can contain the <noframes> tag when using DTD Transitional documents but not Strict or Frameset documents.
3. Red tags have been deprecated and are allowed in DTD Transitional and Frameset documents but not Strict documents.

Red attributes have been deprecated
<applet> Tag Attribute Summary
Required Tag Specific Core Focus Events Language
height width align alt archive code codebase hspace name object vspace id class style title      

Red attributes have been deprecated
<applet> Tag Attributes
Attribute Description
heightThe height attribute specifies the initial height, in pixels, of the applet.

Note: This is a required attribute.
Note: This attribute has been deprecated.
widthThe width attribute specifies the initial width, in pixels, of the applet.

Note: This is a required attribute.
Note: This attribute has been deprecated.
alignThe align attribute specifies the position of the applet. A value of "bottom", "middle", or "top" specifies the position with respect to surrounding text. a value of "left" or "right" will float the applet to the left or right.

Note: This attribute has been deprecated.
altThe alt attribute is used to specify alternate text to be displayed in the event that the browser is not enabled to display the applet.

Note: This attribute has been deprecated.
archiveThe archive attribute specifies a comma separated list of URLs for resources to be preloaded in order to improve the performance of the applet.

Note: This attribute has been deprecated.
codeThe code attribute is used to specify the path to the applet class or it specifies the name of the file that contains the applet's subclass.

Note: This attribute has been deprecated.
codebaseThe codebase attribute is used to specify a base URL for the applet. If a base URL is specified then the code, archive, and object attributes can use URLs that are relative to the specified base URL.

Note: This attribute has been deprecated.
hspaceThe hspace attribute specifies the amount of white space, in pixels, to the left and right of the applet.

Note: This attribute has been deprecated.
nameThe name attribute is used to specify a name for the applet. Applets on the same web page can use this name to find each other.

Note: This attribute has been deprecated.
objectThe object attribute specifies the name of a resource. The resource contains the serialized representation of the applet's state.

Note: This attribute has been deprecated.
vspaceThe vspace attribute specifies the amount of white space, in pixels, to the top and bottom of the applet.

Note: This attribute has been deprecated.
idThe id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example
classThe class attribute assigns a class name to a tag. The class name does not need to be unique. More than one tag can have the same class name. This allows style sheets or scripts to reference multiple tags with a single class name. See class Example
styleThe style attribute specifies styles for the tag. For Cascading Style Sheets (CSS), the syntax is name:value. Each name:value pair is separated by semicolons. See style Example
titleThe title attribute specifies additional information about the tag. It is common for browsers to display the title when the pointing device stops over the object. See title Example