<applet>: The Embed Java Applet element

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The <applet> element was removed in Gecko 56 and Chrome 47.

Removal is being considered in WebKit and Edge.

The obsolete HTML Applet Element (<applet>) embeds a Java applet into the document; this element has been deprecated in favor of <object>.

Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in.

Content categories Flow content, phrasing content, embedded content, interactive content, palpable content.
Permitted content Zero or more <param> elements, then transparent.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts embedded content.
DOM interface HTMLAppletElement

Attributes

align
This attribute is used to position the applet on the page relative to content that might flow around it. The HTML 4.01 specification defines values of bottom, left, middle, right, and top, whereas Microsoft and Netscape also might support absbottom, absmiddle, baseline, center, and texttop.
alt
This attribute causes a descriptive text alternate to be displayed on browsers that do not support Java. Page designers should also remember that content enclosed within the <applet> element may also be rendered as alternative text.
archive
This attribute refers to an archived or compressed version of the applet and its associated class files, which might help reduce download time.
code
This attribute specifies the URL of the applet's class file to be loaded and executed. Applet filenames are identified by a .class filename extension. The URL specified by code might be relative to the codebase attribute.
codebase
This attribute gives the absolute or relative URL of the directory where applets' .class files referenced by the code attribute are stored.
datafld
This attribute, supported by Internet Explorer 4 and higher, specifies the column name from the data source object that supplies the bound data. This attribute might be used to specify the various <param> elements passed to the Java applet.
datasrc
Like datafld, this attribute is used for data binding under Internet Explorer 4. It indicates the id of the data source object that supplies the data that is bound to the <param> elements associated with the applet.
height
This attribute specifies the height, in pixels, that the applet needs.
hspace
This attribute specifies additional horizontal space, in pixels, to be reserved on either side of the applet.
mayscript
In the Netscape implementation, this attribute allows access to an applet by programs in a scripting language embedded in the document.
name
This attribute assigns a name to the applet so that it can be identified by other resources; particularly scripts.
object
This attribute specifies the URL of a serialized representation of an applet.
src
As defined for Internet Explorer 4 and higher, this attribute specifies a URL for an associated file for the applet. The meaning and use is unclear and not part of the HTML standard.
vspace
This attribute specifies additional vertical space, in pixels, to be reserved above and below the applet.
width
This attribute specifies in pixels the width that the applet needs.

Example

HTML

<applet code="game.class" align="left" archive="game.zip" height="250" width="350">
  <param name="difficulty" value="easy">
  <b>Sorry, you need Java to play this game.</b>
</applet>

Specifications

Specification Status Comment
HTML 5.2
The definition of '<applet>' in that specification.
Recommendation
HTML 5.1
The definition of '<applet>' in that specification.
Recommendation
HTML5
The definition of '<applet>' in that specification.
Recommendation Made obsolete
HTML 4.01 Specification
The definition of '<applet>' in that specification.
Recommendation Deprecated in favor of <object>

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
applet
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support Yes
Notes
Full support Yes
Notes
Notes Removal in Safari is under consideration.
WebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
align
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
alt
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
archive
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
code
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
codebase
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
datafld
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
datasrc
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
height
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
hspace
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
mayscript
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
name
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
object
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
src
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
vspace
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0
width
Deprecated
Chrome No support ? — 47Edge No support 12 — 79Firefox No support ? — 56IE Full support YesOpera No support ? — 34Safari Full support YesWebView Android No support NoChrome Android No support ? — 47Firefox Android No support ? — 56Opera Android No support ? — 34Safari iOS No support NoSamsung Internet Android No support ? — 5.0

Legend

Full support
Full support
No support
No support
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.

Notes

The W3C specification does not encourage the use of <applet> and prefers the use of the <object> element. Under the strict definition of HTML 4.01, this element is deprecated and entirely obsolete in HTML5.