English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Applet element ( <applet>) in HTML indicates that it contains Java applets. This element is deprecated in HTML.5are deprecated and can no longer be used. Web developers should use more general elements.
An embedded Java applet:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Basic Tutorial Website(w3(codebox.com)</title> </head> <body> <applet code="Bubbles.class" width="350" height="350"> Java applet that draws animated bubbles. </applet> </body> </html>
IEFirefoxOperaChromeSafari
Note:Some browsers still have support for <applet> but it requires additional plugins and installation processes to work.
HTML5 The <applet> tag is not supported. Please use <object> or <embed> Tag to replace it.
In HTML 4.01 In HTML, the <applet> element is deprecated.
The <applet> tag defines an embedded applet.
HTML5 The <applet> tag is not supported in HTML. 4.01 The <applet> tag is deprecated.
attribute | value | description |
---|---|---|
code | URL | Specifies the filename of the Java applet. |
object | name | Specifies the resource name of a series of versions that contain the applet. |
attribute | value | description |
---|---|---|
align | left right top bottom middle baseline | Specify the alignment of the applet relative to surrounding elements. |
alt | text | specify the alternate text for the applet. |
archive | URL | specify the location of the archive file. |
codebase | URL | specify the base URL of the applet specified in the code attribute. |
height | pixels | specify the height of the applet. |
hspace | pixels | define the horizontal spacing around the applet. |
name | name | define the name of the applet (used in scripts). |
vspace | pixels | define the vertical spacing around the applet. |
width | pixels | specify the width of the applet. |
In HTML 4.01 in which, the <applet> tag supports the following standard attributes:
attribute | value | description |
---|---|---|
class | classname | specify the class name of the element |
id | id | specify the unique id of the element |
style | style_definition | specify the inline style of the element |
title | text | specify additional information about the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 where, the <applet> tag does not support any event attributes.
For a complete description, please visitEvent Attributes.