HTML Applet Tag

HTML Applet tagHTML Applet Tag defines the embedded applet in the HTML resource or webpage.

Note: The Applet Tag is not supported in HTML 5. Use the HTML5 Object Tag instead.

Also, the Applet Tag is deprecated in the HTML 4.0.1.


Syntax for HTML Applet Tag

<applet code=”YourJava.class” >
</applet>

Example of HTML Applet Tag

HTML Applet Tag Code

</pre>
<applet code="Triangle.class" width="400" height="350">
Java applet that draws some triangles.
</applet>
<pre>

HTML Applet Tag Required Attributes

HTML applet tag required attribute Value Description
code URL Defines the name of the Java applet
object Name Defines a reference to the serialized representation of the Java applet

HTML Applet Tag Optional Attributes

HTML applet tag optional attribute Value Description
align Left,right,top,bottom,middle,baseline Defines the alignment of the applet as per the surrounding elements
alt Text Defines the alternative text for the applet
archive URL Defines the location (URL) of the archive file
codebase URL Defines the relative base URL for applets
height Pixels Defines the height of the applet in pixels
hspace Pixels Defines the horizontal space around the applet
name Name Defines the name of the applet
vspace Pixels Defines the vertical space around the applet
width Pixels Defines the width of the applet in pixels

HTML applet tag supported HTML Global Attributes

HTML applet tag Global attribute Value Description
Class Classname Defines a class name for the applet
Id Id Defines the unique id for the applet
Style Style_definition Defines an inline style for the applet
Title text Defines some extra information about the applets

The HTML applet tag does not support any HTML Event Attributes.


HTML Applet Tag Supporting Browsers

S. No. Browser Supported(Yes/No)
1 Internet Explorer Yes
2 Firefox Yes
3 Google Chrome Yes
4 Opera Yes
5 Safari Yes

Tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.