This deprecated element is not recommended. Authors should generally find an alternative way to accomplish the same task while adhering to all best practices, or simply do without it if it is unimportant.

The HTML <applet></applet> element has been deprecated since HTML4 in favor of the <object></object> element. This element identified the inclusion of a Java applet.


  • 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 might also 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 this 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.

HTML example:

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

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.