Summary -

In this topic, we described about the <applet> tag along with detailed example.

The <applet> tag is not supported in HTML5. Specifies an embedded java applet. The <applet> tag used to define an embedded applet. <applet> can be supported upto HTML 4.01.

<embed> or <object> tags are replacement for <applet> in HTML5. To support <applet> tag, browsers need additional plugin. Most of the browsers are not supporting <applet> tag and still some browsers are supporting.

Required Attributes -

AttributeDescriptionValues
codeSpecifies the file name of an appletURL
ObjectSpecifies a reference of an appletname

Optional Attributes -

AttributeDescriptionValues
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

Syntax -

<applet>text</applet>

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.