HTML <applet> tag

HTML <applet> tag

The <applet> tag embeds a Java applet into the document.

Warning: The <applet> tag is deprecated and is no longer recommended.

Note: Use <object> tag instead of <applet> tag.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <applet code="golf.class" align="left" archive="golf.zip" height="300" width="300"> <param name="difficulty" value="easy"> <p>Sorry, you need Java to play this game.</p> </applet> </body> </html>

Attributes

AttributeValueExplanation
align
  • bottom
  • left
  • middle
  • right
  • top
It will position the applet relative to the content.
alttextSpecifies a descriptive alternate text to be displayed, if browsers do not support java.
archiveURLSpecifies a path to an archived or compressed version of the applet, which might help reduce download time.
codeURLSpecifies a path to the applet's class file.
codebaseURLSpecifies a absolute or relative path of the directory where class file(appplet) is stored.
datafldnameSpecifies the column name from the data source object that supplies the bound data.
datasrcURLIt indicates the id of the data source object that supplies the data that is bound to the <param> elements associated with the applet.
heightpxSpecifies the height of the applet.
hspacepxSpecifies the horizontal spacing of the applet. Either side
mayscriptJavascriptIt allows access to an applet by programs in a scripting language embedded in the document.
nametextSpecifies the name of the applet.
objectURLSpecifies the URL of a serialized representation of an applet.
srcURLSpecifies a URL for an associated file for the applet.
vspacepxSpecifies the vertical spacing of the applet. Either side
widthpxSpecifies the width of the applet.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author