Applet
 
End Tag: Required
Support Key: 2 | 3 | 3.2 | IE3B2 | M | N2
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Top Of Tree | Tag Index | Tag History


What is it?
The APPLET element is the mechanism to embed and invoke a Java application within an HTML document. A browser that understands this element will ignore everything in the content of the APPLET tags except for embedded PARAM elements [which are used to pass parameters to the Applet.] Browsers that do not understand this tag should ignore it and the embedded PARAM tags and process the content between the begin and end APPLET tags instead (this is also happens when the Applet fails to load for any reason.)
Attributes
Align
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This attribute specifies the alignment of text following the APPLET reference relative to the applet on screen. LEFT and RIGHT specify floating horizontal alignment of the applet in the browser window, and subsequent text will wrap around the applet. The other options specify vertical alignment of text relative to the applet on the same line.
Values:
    Left | Right | Top | Texttop | Middle | Textmiddle | Baseline | Bottom | Textbottom
Alt
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This attribute indicates text to be displayed for text only browsers or browsers that do not understand the Applet tag [I am not sure why this attribute exists if the same holds true for all APPLET tag content.]
Values: Alphanumeric characters
Archive
2 | 3 | 3.2 | IE | M | N3B7
Required? No
Description:
Verbatim from Netscape:
"This attribute can improve applet download time by reducing the number of HTTP connections required to fetch applet code. Example:
<applet ARCHIVE="Nuclear.zip" CODE="NuclearPlant.class" WIDTH=500 HEIGHT=500>
</applet>
This will cause the file Nuclear.zip to be downloaded to the user's disk, and will search it for the NuclearPlant class and the classes it requires. The zip file is found relative to the codebase path, and must not be compressed. Classes not in the zip file will still be searched for via the old mechanism if required."
[Note about Applet archiving: Java uses the GNU-ZIP .ZIP format with compression turned off in order to store class libraries.]
Values: An absolute or relative URL
Code
2 | 3 | 3.2 | IE3B2 | M | N2
Required? Yes
Description:
This attribute indicates a URL pointing to the Applet's code/class.
Values: An absolute or relative URL.
CodeBase
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This attribute indicates the base URL of the applet if the CODE attribute is relative. If the CODEBASE URL is relative, it is in relation to the current document URL or the BASE HREF tag, if present.
Values: An absolute or relative URL.
Height
2 | 3 | 3.2 | IE3B2 | M | N2
Required? Yes
Description:
This attribute explicitly specifies the height of the applet in pixels. It can be used to speed up display of the document being downloaded so it can pre-render the document with an applet placeholder while the applet downloads.
Values: Positive integers
HSpace
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This attribute specifies the horizontal spacing (left and right padding) around the applet in pixels.
Values: Positive integers
Name
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This provides a way for the applet to identify the current applet to other applets in the current HTML page.
Values: Alphanumeric characters
VSpace
2 | 3 | 3.2 | IE3B2 | M | N2
Required? No
Description:
This attribute specifies the vertical spacing (top and bottom padding) around the applet in pixels.
Values: Positive integers
Width
2 | 3 | 3.2 | IE3B2 | M | N2
Required? Yes
Description:
This attribute explicitly specifies the width of the applet in pixels. It can be used to speed up display of the document being downloaded so it can pre-render the document with an applet placeholder while the applet downloads.
Values: Positive integers

Style Sheet Attributes
[More on Cascading Style Sheets]
Class
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This represents an assigned semantic classification grouping(s) for the current tag.
Values:
Given as a comma separated list of alphanumeric characters. Class names may contain spaces (multiple consecutive spaces treated as a single space.)
ID
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This assigns an alpha-numeric identifier that is unique to this tag instance. Style sheets may use this attribute to reference the current instance of this tag. Hyperlinks may also use this identifier to serve as a destination.
Values:
An alphanumeric string - initial character must be a letter followed by alphabetic characters, digits, "-" or "." characters. The allowable set of alpha-characters is restricted to the A-Z and a-z set.
Style
2 | 3 | 3.2 | IE3B1 | M | N4B3
Required? No
Description:
This attribute is a text string that provides rendering style information for the current tag.
Values:
Please see the description of inline styles for more information on how to use this attribute and its possible values.
Example
<applet CODEBASE="http://www.foo.com/java/" CODE="javaexample.class" WIDTH=200 HEIGHT=300>
   <param NAME=text1 VALUE="Example Text 1">
   <param NAME=imagecaption VALUE="Image Caption">
   <param NAME=bounceimage VALUE="bounce1.gif">
   <img SRC="non_java_image.gif" WIDTH=200 HEIGHT=300 BORDER=0 ALT="You are missing the full Java Experience.">
</applet>
Parent Model
%Anchors% | %Virtual Formatting% | %Physical Formatting% | %Block Format Parent% | %Multimedia Parent% | <Body> | <Address> | <Basefont> | <Heading> | <Marquee>
Content Model
%Text% | %Anchors% | %Virtual Formatting% | %Physical Formatting% | %Line Break Content% | %Multimedia Content% | <param>
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...