HTML <applet> tag

What is <applet> tag?

The <applet> tag defines the embedded Java applets within an HTML documents. This tag was supported in HTML4.01 but hated in HTML earlier versions and it has completely removed from HTML5 versions. It has been replaced by <object> and <embed> tags with the coming of HTML5.
Type: Block Element

Example of <applet> tag

<applet code = "smoke.class" width = "100" height = "450">
Java applet code goes under here to draw the style of flying smoke.
</applet>

It simply illustrates how <applet> element can perform. Here, we don't cover their entire studies and codes since they are no longer valid in HTML5.

Supported Browsers

not supported
Tag Chrome browser Internet explorer browser Firefox browser Safari browser Opera browser
<applet> not supported not supported Yes Yes not supported

More Reference

We highly recommended not to use <applet> tag in HTML5 document. It was supported in the earlier browsers of Internet Explorer by using additional plug-ins/installations. Note that <applet> element was supported in HTML4.01, but it was used hardly.

Attributes of <applet> tag

Attribute Value Notes
align top
right
bottom
left
middle
baseline
It was used to specify the alignment of an applet with respect to the surrounding contents or elements.
alt text It was used to specify an alternate text for an applet.
archive URL It specifies the location of JAR (Java Archive) File containing the code of an applet.
border pixel It specifies the border around the applet panel.
code URL It specifies the file name of a Java applet.
codebase URL It specifies a relative base URL that contain application code to be used in an applet element.
height pixel It specifies the display width of a Java applet.
hspace pixel It defines the horizontal spacing around an applet on both sides.
name name It defines the name for an applet which is to be contained in scripts.
object name It denotes a reference as a representation of an applet.
vspace pixel It defines the vertical spacing around an applet on both sides.
width pixel It specifies the display width of a Java applet.