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 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.
The <applet>
element was removed in Gecko 56 and Chrome in late 2015. Removal is being considered in WebKit and Edge.
align
bottom
, left
, middle
, right
, and top
, whereas Microsoft and Netscape also might support absbottom
, absmiddle
, baseline
, center
, and texttop
.alt
<applet>
element may also be rendered as alternative text.archive
code
codebase
attribute.codebase
datafld
<param>
elements passed to the Java applet.datasrc
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
hspace
mayscript
name
object
src
vspace
width
<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>
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | Yes1 | Yes2 | Yes — 56 | Yes | Yes3 | Yes4 |
align |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
alt |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
archive |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
code |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
codebase |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
datafld |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
datasrc |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
height |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
hspace |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
mayscript |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
name |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
object |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
src |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
vspace |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
width |
Yes | Yes | Yes — 56 | Yes | Yes | Yes |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | No | No | Yes2 | Yes — 56 | No | ? | ? |
align |
No | No | Yes | Yes — 56 | No | ? | ? |
alt |
No | No | Yes | Yes — 56 | No | ? | ? |
archive |
No | No | Yes | Yes — 56 | No | ? | ? |
code |
No | No | Yes | Yes — 56 | No | ? | ? |
codebase |
No | No | Yes | Yes — 56 | No | ? | ? |
datafld |
No | No | Yes | Yes — 56 | No | ? | ? |
datasrc |
No | No | Yes | Yes — 56 | No | ? | ? |
height |
No | No | Yes | Yes — 56 | No | ? | ? |
hspace |
No | No | Yes | Yes — 56 | No | ? | ? |
mayscript |
No | No | Yes | Yes — 56 | No | ? | ? |
name |
No | No | Yes | Yes — 56 | No | ? | ? |
object |
No | No | Yes | Yes — 56 | No | ? | ? |
src |
No | No | Yes | Yes — 56 | No | ? | ? |
vspace |
No | No | Yes | Yes — 56 | No | ? | ? |
width |
No | No | Yes | Yes — 56 | No | ? | ? |
1. Although the element is still supported, the Java plugin has been removed in Chrome 42 and an error message is displayed since then. Removal is under consideration.
2. Removal in Edge is under consideration.
3. Removal in Opera is under consideration.
4. Removal in Safari is under consideration.
The W3C specification does not encourage the use of <applet>
and prefers the use of the <object>
tag. Under the strict definition of HTML 4.01, this element is deprecated and entirely obsolete in HTML5.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/applet