tadam logo

<applet>

HTML <applet> Tag

The applet element is deprecated.

A deprecated element or attribute is one that has been outdated.
Deprecated elements may become obsolete in the future, but browsers should continue to support deprecated elements for backward compatibility.

Example

An embedded Java applet:
<applet code="Bubbles.class" 
width="350" height="350">
Java applet that draws animated bubbles.
</applet>

Definition and Usage

The <applet> tag defines an embedded applet.

Browser Support

Note: There is still some support for the <applet> tag in some browsers, but it requires additional plug-ins/installations to work.

Differences Between HTML and XHTML

NONE

Tips and Notes

Tip: To include applets, use the <object> tag instead!

Standard Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

The <applet> tag supports the following standard attributes:

AttributeValueDescriptionDTD
classclassnameSpecifies a classname for an elementSTF
ididSpecifies a unique id for an elementSTF
stylestyle_definitionSpecifies an inline style for an elementSTF
titletextSpecifies extra information about an elementSTF

More information about Standard Attributes.

Required Attributes

AttributeValueDescriptionDTD
codeURLSpecifies the file name of a Java appletTF
objectnameSpecifies a reference to a serialized representation of an appletTF

Optional Attributes

AttributeValueDescriptionDTD
alignleft
right
top
bottom
middle
baseline
Specifies the alignment of an applet according to surrounding elementsTF
alttextSpecifies an alternate text for an appletTF
archiveURLSpecifies the location of an archive fileTF
codebaseURLSpecifies a relative base URL for applets specified in the code attributeTF
heightpixelsSpecifies the height of an appletTF
hspacepixelsDefines the horizontal spacing around an appletTF
namenameDefines the name for an applet (to use in scripts)TF
vspacepixelsDefines the vertical spacing around an appletTF
widthpixelsSpecifies the width of an appletTF
Was this information helpful?
   

Comments