HTML <applet> tag (Not supported in HTML5)

HTML <applet> tag was used to embed the Java applet in an HTML document. This element has been deprecated in HTML 4.0 and instead of it we can use <object> and newly added element <embed>.

The use of Java applet is also deprecated, and most browsers do not support the use of plugins.

Note: The <applet> tag is deprecated in HTML4.0 and not supported in HTML5. So you can use <object> tag or <embed> tag instead of <applet>.

Syntax

Following are some specifications about <applet> tag

DisplayBlock
Start tag/End tagBoth Start tag and End tag
UsageEmbed Applets

Example

Test it Now

Attributes

Specific Attributes

Attribute nameValueDescription
codeURLIt specifies the URL of Java applet class file.
widthpixelsIt specifies the display width of the applet panel.
heightpixelsIt specifies the display height of applet panel
align
  • left
  • right
  • top
  • middle
  • bottom
It specifies the position of applet application relative to surrounding content.
alttextIt is used to display alternative text in case browser does not support Java.
archiveURLThis specifies the archived or compressed version of an applet application.
objectnameIt specifies the URL or reference to a serialized representation of an applet.
codebaseURLIt specifies the exact or relative URL of applets .class file specified in the code attribute.
hspacepixelsIt specifies the horizontal space around the applet.
vspacepixelsIt specifies the vertical space around the applet.
namenameIt specifies the name for the applet

Global Attributes

The <applet> tag supports all Global Attributes in HTML

Event Attributes

The <applet> tag supports all Event Attributes in HTML

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<applet>Not supportedNot SupportedYesNot SupportedYes
Next TopicHTML area Tag