What is an <applet> Applet Tag in HTML ?
HTML <applet> tag was used in HTML 4 to define an embedded applet.
HTML <applet> is used to embed a Javascript applet into a web document.
HTML <applet> tag is supported in HTML4 and removed in HTML5.
What is an embedded applet ?
Embedded applet are called us Plugins for extending more functionalities in the webpage.
These are a computer programs which are used to extend other the browser action for several purposes.
1. Run Java applets
2. Run ActiveX controls
3. Display Flash movies
4. Display maps
5. Scan for viruses
6. Verify a bank id
Most browsers don’t support Applets and its Plugin’s.
Syntax :
<applet code="myApplet.class" width="550" height="400">
Some Text </applet>
Example :
<!DOCTYPE html>
<html>
<head>
<title>HTML applet tag</title>
</head>
<body>
<applet code="myApplet.class" width="550" height="400">
Java applet is called inside the applet.
</applet>
</body>
</html>
HTML coding for a website !!!
Click to Learn More about – HTML Tutorial for beginners
<applet> Tag Attributes
<applet> tag required following attributes.
Sno | Attributes | Value | Description |
---|---|---|---|
1 | code | url | Specifies the file name of a JavaScript applet. |
2 | object | name | Specifies name to serialized representation of the applet. |
3 | name | name | Specifies the name of referenced by other objects. |
4 | height | size_px | Specifies the height pixel size of the applet. |
5 | width | size_px | Specifies the width pixel size of the applet. |
Global Attributes
<applet> tag also support global attributes.
Sno | Attributes | Value | Description |
---|---|---|---|
1 | id | unique_name | Declared unique id for an element. |
2 | class | class_name | Declared one or more classnames for an element. |
3 | style | styles | CSS inline styles specify an element. |
4 | title | title | Specify extra details of element contain, this will display as a “tooltip” for an elements. |
Browser Compatibility
Sno | Browser | Support |
1 | Chrome | Yes |
2 | Firefox | Yes |
3 | Edge | Yes |
4 | Opera | Yes |
5 | Safari | Yes |
6 | Internet Explorer | Yes |