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>
  <title>HTML applet tag</title>
  <applet code="myApplet.class" width="550" height="400">
    Java applet is called inside the applet.

HTML coding for a website !!!

Click to Learn More about – HTML Tutorial for beginners

<applet> Tag Attributes

<applet> tag required following attributes.

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.

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

6Internet ExplorerYes