In <applet>
element can embed simple Java applets in an HTML document. This element depreciated in HTML4, so we use the <object>
or <embed>
tags in the latest version, HTML5.
Now that browsers do not support Java plugins,
<applet>
is not supported in HTML5.
<!-- basic syntax of HTML applet Tag! -->
<applet attribute1 attribute2 attribute3....>
<param name='parameter1' value='parameter2'>
<!-- Code/Content here -->
</applet>
Attribute Name | Value | Description |
code | URL | URL of Java applet Class |
alt | Text | Placeholder text |
archive | URL | Specify the achieve version of applet |
name | Text | Name for applet |
hspace | Pixels | Horizontal Spacing |
vspace | Pixels | Vertical Spacing |
height | Pixels | Display height of applet panel |
width | Pixels | Display width of applet panel |
align | Index | Position either left, middle, right, top, bottom |
This code helps EdPresso.class
Java applet API
, which takes name
and value
as parameters.
<embed>
and <object>
tagsWe can use these tags instead of the<applet>
element in HTML5.
In the code below, the highlighted lines illustrate the purpose of these tags and how to use them in your code.