|
Applets are little applications that run
inside a rectangular region on a Web page. With applets, you
can display animation, sound, games and general utilities
(such as calculators and search engines).
Syntax :
<APPLET CODE = "name.class"
WIDTH = pixels HEIGHT = pixels> </APPLET>
In the CODE attribute, place the name of
the java class to be run (that class file should be in the
same directory as your HTML file), and in the WIDTH and HEIGHT
attributes, declare the width and height of the drawing area
(or canvas) to be used by the applet.
Example :
<html> <head><title> Applet
Tag </title></head>
<body>
<applet code= "firstapp.class"
width =400 height = 100>
</applet> </body></html>
The <param>
tag is used inside the <APPLET>
tag to define parameters for the applet. The <param>
tag is used with two attributes: the NAME attribute and the VALUE attribute.
Syntax :
<PARAM NAME = "ParameterName"
VALUE = "ParameterValue">
| PARAM - |
word tells your applet
that you are passing parameters to the applet. |
| NAME - |
a reserved word in HTML
(Hyper Text Markup Language, the format understood by
the Browser), to recognize the parameter name. |
| VALUE - |
is also a reserved
word in HTML, to recognize the parameter value. |
Example :
<html>
<head><title> applet tag </title></head>
<body> <applet code = "firstapp.class" width =400 height
= 100">
<param name = "empnm" value = "Ashish">
<param name = "empid" value = "A01">
</applet> </body> </html>
Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.
|
|