HTML » Tags » applet

Version: 3.2

Compability: Explorer 4, 5  Netscape 6

<applet> ... </applet>

The <applet>  elements are deprecated in HTML 4.01.

The <applet> tag is used to download and execute a Java applet. The applet tag is officially deprecated effective with HTML 4.0. Instead, you are now to use the object tag. However, this tag remains in wide use on the Internet and is recognized by all major browsers.

The applet is treated like an image and is rendered into the flow of the text without a line break. You can define the size of the region (the applet window) in which the applet will appear. By using the attributes for applet, style sheets code, and other HTML tags, you can create a presentation and appearance for the applet in the text flow to suit your needs.
Java applets can be very slow to load and may not display in many browsers.
Many Java applets require that document-specific parameters be provided to control the execution. You can use the param tag, inserted between the opening and closing applet tags, to define these parameters.
The closing tag is mandatory.


<applet codebase="clock/classes" code="JavaClock.class" width="150" height="150">

This example displays a Java applet clock.

Language(s): HTML

See Also: