HTML Applet Tag

The tag was used to embed a Java applet inside a web page. A Java applet is a small program written in Java that can run inside a browser and perform some kind of interactive or visual task. For example,, you could create a small game, animation, or a calculator using a Java applet.

Syntax -
<applet  width="..." height=".." code="file-name.class>
Java Applet is not supported in your browser.
</applet>
AttributeDescriptionValues
codeSpecifies the file name of an appletURL
ObjectSpecifies a reference of an appletname
alignSpecifies the alignment of an appletleft
right, top, bottom, middle, baseline
AltSpecifies an alternate text for an appletText
ArchiveSpecifies the archive location of appletURL
HeightSpecifies the height of the appletPixels
NameSpecifies the name of the appletName
WidthSpecifies the width of the appletpixels
Example -

Scenario - A simple example

<!DOCTYPE html>
<html>
	<head>
		<title> address example</title>
	</head>
	<body>
		<applet width="150" height="150" code="new.class">
			Java applet imported.
		</applet>
	</body>
</html>
Output -
Java applet imported.
Explaining Example -

Here, the web page is trying to run a Java applet named new.class. But remember, this will not work in modern browsers anymore.