APPLET

The <APPLET> tag specifies an applet to be run within a web document.

CODEBASE

This optional attribute specifies the base URL of the applet to be displayed. This should be a directory, not the name of the applet itself. If this attibute is not specified then the URL of the current document is used.

CODE

This required attribute specifies the file that contains the compiled Java code for the applet. It must be relative to the CODEBASE if that attribute is specified.

WIDTH

This required attribute specifies the initial width in pixels that the applet needs in the browser's windows.

HEIGHT

This required attribute specifies the initial height in pixels that the applet needs in the browser's windows.

ALT

This optional attribute specifies text that should be displayed by browsers that understand the <APPLET> tag but do not support Java.

NAME

This optional attribute gives a name to the applet instance. Applets that are running at the same time can look each other up by name and communicate with each other.

ALIGN

This optional attribute specifies the applet's alignment on the page. It behaves just like the ALIGN attribute of the <IMG> tag, and should support at least the same alignment values that the <IMG> tag does. These values include: TOP, MIDDLE, and BOTTOM.

VSPACE

This optional attribute specifies the margin in pixels that the browser should put above and below the applet. It behaves just like the VSPACE attribute of the <IMG> tag.

HSPACE

This optional attribute specifies the margin in pixels that the browser should put on either side of the applet. It behaves just like the HSPACE attribute of the <IMG> tag.

PARAM

The <PARAM> tag, with its NAME and VALUE attributes, specifies a named parameter and a string value that are passed to the applet. These parameters function like environment variables or command line arguments do for a regular application. An applet can look up the value of a parameter specified in a <PARAM> tag with the Applet.getParameter() method. Any number of parameters can be included for an applet.

alternate-html

If a web browser does not support Java and does not understand the <APPLET> tag, it will ignore the applet and its parameters and will simply display any text that appears in the alternate-html field.


Back to Lecture2