Summary -
In this topic, we described about the <applet> tag along with detailed example.
The <applet> tag is not supported in HTML5. Specifies an embedded java applet. The <applet> tag used to define an embedded applet. <applet> can be supported upto HTML 4.01.
<embed> or <object> tags are replacement for <applet> in HTML5. To support <applet> tag, browsers need additional plugin. Most of the browsers are not supporting <applet> tag and still some browsers are supporting.
Required Attributes -
Attribute | Description | Values |
---|---|---|
code | Specifies the file name of an applet | URL |
Object | Specifies a reference of an applet | name |
Optional Attributes -
Attribute | Description | Values |
---|---|---|
align | Specifies the alignment of an applet | left right top bottom middle baseline |
Alt | Specifies an alternate text for an applet | Text |
Archive | Specifies the archive location of applet | URL |
Height | Specifies the height of the applet | Pixels |
Name | Specifies the name of the applet | Name |
Width | Specifies the width of the applet | pixels |
Syntax -
<applet>text</applet>
Example -
<!DOCTYPE html>
<html>
<head>
<title> address example</title>
</head>
<body>
<applet width="150" height="150" code="new.class">
Java applet imported.
</applet>
</body>
</html>