Deprecated in HTML5. Do not use.


Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more

The applet HTML element, which was used in the past to embed Java applications in an HTML document, was introduced and simultaneously deprecated in favor of the object element when the HTML 4.01 specification was released in December of 1999. However, that didn’t stop developers from using the element which had been made available and functional by the release of the Java browser plugin in 1995.

The trend in recent years has been for web browsers to remove support for plugins. As a result, Java’s days as a web programming language are effectively over. Java-based applications designed to run in the browser must be transitioned to alternate technologies and frameworks or face a complete lack of browser support.

Java Applets are Obsolete

There are two distinct ways in which applets have been deprecated:

  1. The applet element was deprecated in HTML 4.01 and rendered entirely obsolete by HTML5.
  2. Support for the Java browser plugin has been dropped by virtually all leading web browsers.

The “ Element: Introduced and Simultaneously Deprecated

The applet element was used to embed interactive scripts written in the programming language Java, which is not to be confused with JavaScript, directly into an HTML document. However, the object element could also be used to embed Java objects. As a result, the applet element was deprecated just as quickly as it was introduced in HTML 4.01 in favor of the more broadly useful object element.

While some browsers do still recognize the applet element, others do not. Those that do still recognize the applet element may discontinue support at any time now that HTML5 has obsoleted the tag. In other words, if you’re still using the applet element, switch to an alternate technology immediately.

Java: Still Popular, Just Not for the Web

No one can deny that Java is still one of the most useful and popular programming languages. However, it’s grip on the world wide web is weak and slipping. Why is this?

Java is a very popular programming language for custom enterprise applications, operating systems, and system utilities. However, it has suffered from a long history of security issues when deployed on the web. In addition, it’s status as a plugin technology has made it a target of web standards advocates and security specialists who are pushing quite successfully for a completely plugin-free web experience.

Support for Java has always required a browser plugin, and recently support for the plugin has been dropped by leading web browsers such as Google Chrome, Mozilla Firefox, and Microsoft Edge.

Java isn’t going away. It will still be used widely for enterprise applications, operating systems, and much more. According to some surveys, Java may be the most in-demand programming language when all programming applications are taken into account. However, Java’s days as a programming language for web-based applications are behind us.

Potential Replacements for Java Applets

If you have Java-powered content and resources on your website embedded using the applet element, you should switch to the object element immediately. You also need to start investigating a complete transition over to supported web technologies.

You have two different options for transitioning away from embedded Java applets:

  1. Replace the Java applet with a web application written in a programming language with broad browser support.
  2. Transition the web-based applet into a full Java Web Start web-launched desktop application.

Web-Based Applications: Transition Away from Java

If your Java-powered application needs to run in the browser as part of a website you will need to transition to a client-side programming language such as JavaScript or Flash.

Our recommendation is to switch to JavaScript. This flexible programming language can be used for both client and server side programming, and is supported by every major browser. JavaScript is also entrenched as one of the fundamental technologies of the web. While no one can predict the future, if you’re going to make a bet on a programming language that is going to be used on the web for a very long time, you will do well to bet on JavaScript.

Web-Launched Desktop Applications: Transition to Java Web Start

If your application is robust enough to run as a full desktop application, it’s possible to transition away from running the Java applet in a web browser to running it as a stand-alone application. The framework Oracle has developed to create Java applications that can be launched from a link embedded in a web page is called Java Web Start.

Migrating a Java Applet to a Web Start environment is usually relatively simple. The thing you’ll have to keep in mind is that the new desktop application will run completely independently of the website that launched it. If you have been using Java to run a web-based application embedded in your website, there simply isn’t a way to continue doing that for the long term, and if you want your application to run as part of a website you must switch to an alternate technology.

The Future: A Plug-In Free Web

The future of the web will include increased functionality built right into the fundamental web technologies of CSS, HTML, and JavaScript. Already, we can see this progress as support for media is built right into HTML5 and CSS is now capable of creating impressive animations and transitions previously only possible with plugins or JavaScript.

The days of web applications powered by plugins like Java are behind us. While some plugins will continue to enjoy niche use to meet specific needs, the vast majority of modern web pages and applications will be built using languages that are fully supported by a plugin-less browser.

Jon is a freelance writer, travel enthusiast, husband and father. He writes about web technologies such as WordPress, HTML, and CSS.