The APPLET element defines an embedded applet.
<applet code="example.class" width="100" height="50"> - </applet>
| Attribute | Value | Explanation |
|---|---|---|
| code=" " | URL | the URL of the class file |
| codebase=" " | URL | the base URL for the code attribute |
| alt=" " | alternate text | a short description |
| width=" " | pixels or % | the width of the applet |
| height=" " | pixels or % | the height of the applet |
The use of this element is deprecated. (Use the OBJECT element instead)
Example with parameter
The PARAM element is placed inside the APPLET element.
<applet code="example.class" width="100" height="50">
<param name="para1" value="123">
<param name="para2" value="abc">
</applet>
Defines the alternate content
The content of the APPLET element is displayed by the browsers that do not support applets.
<applet code="example.class" width="100" height="50">
<param name="para1" value="123">
<param name="para2" value="abc">
<img src="example.gif" alt="Example" width="200" height="100">
</applet>
<applet code="example.class" width="100" height="50"> <param name="bgcolor" value="ffff00"> <param name="border" value="3"> Alternative content. </applet>