<applet>
Published Mar 24, 2022Updated Jun 12, 2024
Contribute to Docs
The <applet>
element was used to embed Java applets into an HTML page. It has since been deprecated and removed from the HTML specification. This tag should no longer be used as browsers no longer support it.
Syntax
The original syntax for the <applet>
element looked like this:
<!-- This is no longer supported --><applet code="url of Java class file" width="300" height="300">Text displayed when no Java runtime is available.</applet>
code
: This attribute specifies the URL for the Java class file.
Note: The
<applet>
element could also use common attributes likewidth
andheight
to define its dimensions on the page. It could also include one or more<param>
tags to pass parameters to the Java applet.
The <applet>
element is deprecated due to security and compatibility concerns. The <object>
or <embed>
tags can be used as modern alternatives.
Example
The following image shows an example applet:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn HTML on Codecademy
- Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Free course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner Friendly7 hours - Free course
Learn Java
Learn to code in Java — a robust programming language used to create software, web and mobile apps, and more.Beginner Friendly16 hours