Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

Adding applets with applet

The applet element is a container for any number of parameter (param) elements. The following is an example of how an applet element for a game might look:

<applet codebase=class code="Wacky.class" width="300" height="400">
  <param name="Delay" value="250" />
  <param name="Time" value="120" />
  <param name="PlaySounds" value="YES" />
</applet>

The applet element contains a number of standard attributes:

code

Tells the browser which applet will be used. Applets end with the suffix .class or .jar. This attribute is required.

codebase

This tells the browser in which directory to find the applets. If the applets are in the same directory as the page, the codebase attribute is not necessary.

width, height

These specify the pixel dimensions of the “window” the applet will occupy. These attributes are required for the Java applet to function properly.

The applet element may also use many of the same attributes used for images, such as alt for providing alternative text if the applet cannot be displayed, and presentational attributes such as align (for positioning the applet in the flow of text), and hspace/vspace (used in conjunction with align).

Special parameters for the applet are provided by any number of parameter elements (sometimes there are none). The param element always contains the name of the parameter (name) and its value (value). Parameters provide special settings and controls that are specific to the particular applet, so you need to follow the parameter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page