HTML Tags – Applet Tag


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.

SnoAttributesValueDescription
1codeurlSpecifies the file name of a JavaScript applet.
2objectnameSpecifies name to serialized representation of the applet.
3namenameSpecifies the name of referenced by other objects.
4heightsize_pxSpecifies the height pixel size of the applet.
5widthsize_pxSpecifies the width pixel size of the applet.

Global Attributes

<applet> tag also support global attributes.

SnoAttributesValueDescription
1idunique_nameDeclared unique id for an element.
2classclass_nameDeclared one or more classnames for an element.
3stylestylesCSS inline styles specify an element.
4titletitleSpecify extra details of element contain, this will display as a “tooltip” for an elements.

Browser Compatibility

SnoBrowserSupport
1ChromeYes
2FirefoxYes
3EdgeYes
4OperaYes
5SafariYes
6Internet ExplorerYes