DEV Community

Share Point Anchor
Share Point Anchor

Posted on • Originally published at sharepointanchor.com on

HTML <applet> Applet Tag

The tag is used to embed the java applet into any HTML document. It contains the attributes that identify the applet to be displayed and give the web browser hints about how it should be displayed.

Note: The tag is deprecated in HTML 4.0 and not supported in HTML 5. So you can use the tag or tag instead of the tag.

Estimated reading time: 3 minutes

Syntax:

The tag has both opening tag and closing tag. The content is written between these two tags.

The use of Java applets is now deprecated as most browsers no longer support the use of plug-ins , including the Java plug-in. But some browsers still support the tag with some additional plug-in.

Sample of the HTML Tag:


<!DOCTYPE html>
<html>
  <head>
    <title>Applet Tag in HTML</title>
  </head>
  <body>
    <applet code="game.class" align="center" archive="game.zip" height="250" width="350">
      <param name="difficulty" value="easy">
      <b>Sorry, You need Java to play this game.</b>
    </applet>
  </body>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

Result

Attributes:

The following table shows the attributes that are specific to the HTML applet tag.

Attributes Value Description
align Left, Right, Top, Bottom, Middle, Baseline This attribute is used to position the applet according to other elements
alt Text It helps to create an alternate text for the applet
archive URL It specifies a comma-separated list of URLs that defines an archive file’s location
code URL This attribute will define the Java applet’s name
object Name It helps to define a reference to a serialized representation of an applet
codebase URL Gives a relative base URL for applets specified in the code attribute
height Pixels It specifies the initial height of the applet’s display area
hspace Pixels This attribute defines the amount of horizontal space around the applet
name Name It is used to define a name for the applet
vspace Pixels Specifies the number of whitespaces to be reserved on the top and bottom side of the applet (Vertical Spaces)
width Pixels It will define the width of an applet
Attributes

Browser Support:

Browser Support

Related Articles:

The post HTML Applet Tag appeared first on Share Point Anchor.

Top comments (0)