Sunday 25 March 2012

Applet Tag

<applet> tag

•The <applet> tag in HTML is used to identify the applets in a webpage by the browser and by applet viewer.
•If there are multiple <applet> tags, applet viewer opens each applet in a separate window. Where as browser can load both the applets in a single page.

<applet> tag attributes: 

•Following are the attributes or options supported by the <applet> tag:

1) codebase: This attribute is used to specify the base URL where the applet file(.class file) is located. By default this property will be set to the location where the .html file is available.

2) code: This attribute is used to specify the name of the applet file(.class file)

3) width: Used to specify the width(in pixels) of the applet’s display area.

4) height: Used to specify the height(in pixels) of the applet’s display area.


5) name: This attribute is used to specify the name of the applet. It is used to identify one applet from another, if there are multiple applets in the same webpage.

6) alt: This attribute is used display a short message when the browser identifies the <applet> tag, but is not able to load the applet into browser.

7) align: This attribute is used to specify the alignment of the applet in the browser.

8) vspace: Used to specify some gap above and below the applet’s display area.

9) hspace: Used to specify some gap left and right to the applet’s display area.

10) param: Used to specify the parameters for the applet. This param tag has attributes, “name” and “value”. We use “name” attribute to specify the name of the parameter and “value” attribute to specify the value of the parameter.

Some other attributes of the <applet> tag are “archive” and “object”

1 comment: