English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

Complete list of HTML tags

HTML: <applet> Tag

The Applet element ( <applet>) in HTML indicates that it contains Java applets. This element is deprecated in HTML.5are deprecated and can no longer be used. Web developers should use more general elements.

Online examples

An embedded Java applet:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(w3(codebox.com)</title> 
</head>
<body>
<applet code="Bubbles.class" width="350" height="350">
Java applet that draws animated bubbles.
</applet>
</body>
</html>

Browser compatibility

IEFirefoxOperaChromeSafari

Note:Some browsers still have support for <applet> but it requires additional plugins and installation processes to work.

Tag specification and usage instructions

HTML5 The <applet> tag is not supported. Please use <object> or <embed> Tag to replace it.

In HTML 4.01 In HTML, the <applet> element is deprecated.

The <applet> tag defines an embedded applet.

HTML 4.01 and HTML5Differences between

HTML5 The <applet> tag is not supported in HTML. 4.01 The <applet> tag is deprecated.

Required attribute

attributevaluedescription
codeURLSpecifies the filename of the Java applet.
objectnameSpecifies the resource name of a series of versions that contain the applet.

Optional attribute

attributevaluedescription
alignleft
right
top
bottom
middle
baseline
Specify the alignment of the applet relative to surrounding elements.
alttextspecify the alternate text for the applet.
archiveURLspecify the location of the archive file.
codebaseURLspecify the base URL of the applet specified in the code attribute.
heightpixelsspecify the height of the applet.
hspacepixelsdefine the horizontal spacing around the applet.
namenamedefine the name of the applet (used in scripts).
vspacepixelsdefine the vertical spacing around the applet.
widthpixelsspecify the width of the applet.

Standard Attributes

In HTML 4.01 in which, the <applet> tag supports the following standard attributes:

attributevaluedescription
classclassnamespecify the class name of the element
ididspecify the unique id of the element
stylestyle_definitionspecify the inline style of the element
titletextspecify additional information about the element

For a complete description, please visitStandard Attributes.

Event Attributes

In HTML 4.01 where, the <applet> tag does not support any event attributes.

For a complete description, please visitEvent Attributes.