**`<applet>`** was used in the 1990s and early 2000s to embed small Java programs ('applets') that ran inside the browser via a Java plugin. Both the element and the underlying Java-applet plugin technology have been fully abandoned: HTML5 formally removed `<applet>` from the spec, and no current browser includes Java plugin support at all (major browsers dropped NPAPI plugin support entirely years ago, and Oracle itself deprecated the Java Applet API). Any `<applet>` markup found today is purely a historical artifact with zero functional effect.
1Understanding <applet>
`<applet>` was used in the 1990s and early 2000s to embed small Java programs ('applets') that ran inside the browser via a Java plugin. Both the element and the underlying Java-applet plugin technology have been fully abandoned: HTML5 formally removed <applet> from the spec, and no current browser includes Java plugin support at all (major browsers dropped NPAPI plugin support entirely years ago, and Oracle itself deprecated the Java Applet API). Any <applet> markup found today is purely a historical artifact with zero functional effect.
If you ever encounter <applet> in genuinely old code, know that it simply won't run in any browser released in the last decade or so — the entire underlying Java-plugin technology it depended on no longer exists in browsers.
<!-- Historical example, non-functional in any modern browser -->
<applet code="Clock.class" width="150" height="150"></applet>2Practical Example
Here is a real-world application of <applet> showing how it is used in production HTML.
<!-- Modern equivalent of interactive in-browser functionality: plain JavaScript -->
<canvas id="clock" width="150" height="150"></canvas>
<script>
// Draw and update a clock using the Canvas API instead of a Java applet
</script>3Best Practices
Follow these guidelines when working with <applet>:
1. Never use <applet> — it's entirely removed from the HTML5 spec and non-functional in every modern browser
2. If migrating legacy Java-applet functionality, it needs to be rebuilt with modern JavaScript, WebAssembly, or a server-side equivalent — there's no direct drop-in browser replacement
3. Treat any <applet> found in old code as dead, non-functional markup to be removed
Tip: If you ever encounter <applet> in genuinely old code, know that it simply won't run in any browser released in the last decade or so — the entire underlying Java-plugin technology it depended on no longer exists in browsers.
<!-- Historical example, non-functional in any modern browser -->
<applet code="Clock.class" width="150" height="150"></applet>