Using the html APPLET tag


This section tells you most of what you need to know to use the <APPLET> tag. It starts by showing you the tag's simplest form. It then discusses some of the most common additions to that simple form: the <PARAM> tag, alternate HTML code and text, the CODEBASE attribute, and the ARCHIVE attribute. For a detailed description of the <APPLET> tag,

The applet tag is used to start an applet from both an HTML .Document and from an applet viewer .An applet viewer will execute each APPLET tag that's it finds in a separate window while web browsers like Netscape Navigator ,Internet Explorer ,and Hot-java will allow many applets on single page.

You should already have seen the simplest form of the <APPLET> tag:
<APPLET CODE=AppletSubclass.class WIDTH=anInt HEIGHT=anInt>
</APPLET>

Specifying Parameters

<APPLET CODE="Animator.class" WIDTH=460 HEIGHT=160>
<PARAM NAME="imageSource" VALUE="images/Beans">
<PARAM NAME="backgroundColor" VALUE="0xc0c0c0">
<PARAM NAME="endImage" VALUE=10>
<PARAM NAME="soundSource" VALUE="audio">
<PARAM NAME="soundtrack" VALUE="spacemusic.au">
<PARAM NAME="sounds"
    VALUE="1.au|2.au|3.au|4.au|5.au|6.au|7.au|8au|9.au|0.au">
<PARAM NAME="pause" VALUE=200>
. . .
</APPLET>
 

Required Attributes

Attribute Value Description
code URL Specifies the file name of a Java applet
object name Specifies a reference to a serialized representation of an applet

Optional Attributes

Attribute Value Description
align left
right
top
bottom
middle
baseline
Specifies the alignment of an applet according to surrounding elements
alt text Specifies an alternate text for an applet
archive URL Specifies the location of an archive file
codebase URL Specifies a relative base URL for applets specified in the code attribute
height pixels Specifies the height of an applet
hspace pixels Defines the horizontal spacing around an applet
name name Defines the name for an applet (to use in scripts)
vspace pixels Defines the vertical spacing around an applet
width pixels Specifies the width of an applet

Standard Attributes

The <applet> tag supports the following standard attributes in HTML 4.01:

Attribute Value Description
class classname Specifies a class name for an element
id id Specifies a unique id for an element
style style_definition Specifies an inline style for an element
title text Specifies extra information about an element

 

0 comments:

Post a Comment

 

learn java programming Copyright © 2011-2012 | Powered by appsackel.org