<applet>
, indicates that at this point processing of the HTML should stop and an applet should be loaded.
The <applet>
statement must include several pieces of information:
<applet>
tag in an HTML document might look like this:<applet code = "MyApplet.class" codebase="/saclasses/test" width=400 height=300> </applet>The various parts here are:
<applet
This introduces the tag
code = "MyApplet.class"
This tells the browser the path (none here) and the name of the applet
codebase="/saclasses/test"
This tells the browser where on the Web Server (relative to the server root-this is a URL) to start with the codebase path and name in order to find the applet. The applet should be located in the directory /
htmlroot
/saclasses/test
.
width = 400
This defines the width of the rectangular area of screen reserved for the applet's use. Typically, it will appear as a grey square
height = 300>
This defines the height of the rectangular area of screen reserved for the applet's use. Typically, it will appear as a grey square.
These four are usually the minimum required to display an applet. Sometimes the codebase parameter will be omitted because the code will reside at the root of the Web Server, although storing code here is not recommended.
Often, an applet requires other parameters. These are given to the applet in the form of parameter statements like this:
<PARAM NAME="ParameterName" VALUE="ParameterValue">that come between the
<applet>
and </applet>
statements. The quotes are optional but usually needed, especially for items with spaces.