Syntax of HTML APPLET Tag in Java

In Java, HTML APPLET Tag is used to start an applet. The applet could be started from an HTML file or an applet viewer.




CODE = appfile

[ALT = alttext]

[NAME = appname]

WIDTH = pixels HEIGHT = pixels

[ALIGN = alignment]

[VSPACE = pixels] [HSPACE = pixels]


[< PARAM NAME = Attribname VALUE = AttribValue>]

[< PARAM NAME = Attribname2 VALUE = AttribValue>]

. . .

[Other HTML codes]



CODEBASE: Optional attribute for URL of applet.

CODE: Required attribute for the applet file.

ALT: Optional attribute for displaying the alternate text.

NAME: Optional attribute for applet name.

WIDTH: Required attribute for width in pixels.

HEIGHT: Required attribute for height in pixels.

ALIGN: Optional attribute for alignment of applet. Values can be: TOP, MIDDLE, BOTTOM, LEFT, RIGHT, TEXTTOP, BASELINE, ABSMIDDLE, and ABSBOTTOM.

VSPACE: Optional attribute in pixels for top or bottom of applet.

HSPACE: Optional attribute in pixels for sides of applet.

PARAM NAME: For name of attribute.

AND VALUE: For value of attribute.

Leave a Reply