HTML applet Tag
Last Updated :
21 Nov, 2024
Improve
The applet tag in HTML was used to embed Java applets into any HTML document. The <applet> tag was deprecated in HTML 4.01, and its support has been completely discontinued starting from HTML 5. Alternatives available in HTML 5 are the <embed> and the <object> tags. Some browsers still support the <applet> tag with the help of some additional plug-ins/installations to work.
<!DOCTYPE html>
<html>
<applet code="HelloWorld">
<param name="message" value="HelloWorld">
</applet>
</html>
Syntax:
<param name=parameter_name value=parameter_value>
The name assigned to the name attribute of the param tag is used by the applet code as a variable to access the parameter value specified in the value attribute. In this way, the applet is able to interact with the HTML page where it is embedded, and can work on values provided to it by the page during run-time.
Attributes:
Attribute Values | Description |
---|---|
align | Specifies the alignment of an applet. |
alt | Specifies an alternate text for an applet. |
archive | Specifies the location of an archive file. |
border | Specifies the border around the applet panel. |
codebase | Specifies a relative base URL for applets specified in the code attribute. |
height | Specifies the height of an applet. |
hspace | Defines the horizontal spacing around an applet. |
mayscript | Indicates whether the Java applet is allowed to access the scripting objects of the web page. |
name | Defines the name for an applet (to use in scripts). |
vspace | Defines the vertical spacing around an applet. |
width | Specifies the width of an applet. |