HTML <applet> tag
When writing in HTML, the <applet> tag is a block element used to embed a Java applet. It is useful when you want to add more functionality to your web pages. The following sections contain information about this tag, including an example of its code, as well as related attributes and browser compatibility.
<applet code="BounceLetters.class" width="350" height="350">
Java applet that draws bouncing text characters.
In an HTML tag, attributes dictate certain aspects of an HTML element. Attributes are made up of a name and value pair. All HTML tags support standard attributes. The following table shows attributes that have to be used with the <applet> tag, as well as a description of each.
|code||Designates the Java applet's file name.|
|object||Designates the URL of a serialized representation of an applet.|
An optional attribute is one that may be used in addition to those listed above, but is not required for the <applet> tag to work properly.
|align||Designates the alignment of an applet with respect to its surrounding elements.|
|alt||Designates alternate text for an applet.|
|archive||Designates an archive file's location.|
|codebase||Designates a URL for applets specified in the code attribute.|
|height||Designates the height of the applet.|
|hspace||Sets the horizontal spacing around the applet.|
|name||Sets a name for the applet.|
|vspace||Sets the vertical spacing around the applet.|
|width||Designates the width of the applet.|
|Not supported||All versions||All versions *||All version *||Not supported||Not supported|
*Until it is removed in a future version of HTML