::: Tutorials > HTML

Applets
Insert java applets for fun and excitement


Tutorial by Andrew
Sunday March 30, 2003


The <applet>...</applet> tag allows you to insert a Java Applet on to your HTML page. All of the attributes except for alignment are required. Applets are programs written in Java. There are various resources around the web where you can download Applets for personal use, or even learn to program your own. Java Applets are not the same as JavaScript.

<applet code="ADDRESS" height="HEIGHT=" width="WIDTH" align="ALIGNMENT"></applet>

ADDRESS - This is the address/URL of the applet and essentially tells the browser where to load the .jar or .class file from.

HEIGHT - This sets the height of the applet, measured in pixels.

WIDTH - This sets the width of the applet, measured in pixels.

ALIGNMENT (Optional) - This allows you to set the alignment of the applet.

Examples:

<applet code="myapplet.jar" height="100" width="20"></applet>
<applet code="euroconverter.jar" height="300" width="200" align="absmiddle"></applet>


Copyright 2002 BLUEPRINT Los Altos High School Web Club. All rights reserved.
201 Almond Ave. Los Altos, CA 94022