HTML Tutorial: Complete HTML Tutorial
About Lesson

The <applet> Tag


Introduction to Plug-ins

Plug-ins are computer programs that extend the standard functionality of a browser. They have been used for various purposes, including:

  • Running Java Applets: Java applets were small applications embedded in web pages to provide interactive features.
  • Running ActiveX Controls: ActiveX controls allowed additional functionalities like animations and interactivity.
  • Displaying Flash Movies: Flash was widely used for multimedia content, including videos and animations.
  • Displaying Maps: Plug-ins enabled the integration of maps within web pages.
  • Scanning for Viruses: Some plug-ins offered security features like virus scanning.
  • Verifying Bank IDs: Plug-ins were used for secure authentication, such as verifying bank IDs.

The Decline of Plug-ins

Most modern browsers have discontinued support for Java Applets and other plug-ins. Here’s a summary of the changes:

  • Java Applets: No longer supported in most browsers.
  • ActiveX Controls: Discontinued in all browsers.
  • Shockwave Flash: Support has been turned off in modern browsers.

In the early days of web development, the <applet> tag was used to embed Java applets within web pages. These applets were small programs that extended the standard functionality of browsers, allowing them to run Java applications, display Flash movies, maps, scan for viruses, and more.

The Decline of <applet>

As mentioned earlier, with the evolution of web technologies, most modern browsers have discontinued support for Java Applets and other plug-ins like ActiveX controls. The support for Shockwave Flash has also been turned off.

Alternatives to <applet>

Since the <applet> tag is no longer supported in HTML5; developers must look for alternatives to embed various types of media and objects. Here are some options:

  • Video Embedding: Use the <video> tag.

<video src="movie.mp4" controls></video> 
  • Audio Embedding: Use the <audio> tag.
<audio src="audio.mp3" controls></audio> 
  • Object Embedding: You can use both the <embed> and <object> tags.
<embed src="document.pdf"> <object data="image.png"></object> 

Run the code below:

Loading

More Examples

  • Embed a Document with <embed>:

<embed src="document.pdf" type="application/pdf"> 
  • Embed a Picture with <embed>:
<embed src="picture.png" type="image/png"> 
  • Embed a Document with <object>:
<object data="document.pdf" type="application/pdf"></object> 
  • Embed a Picture with <object>:
<object data="picture.png" type="image/png"></object> 

Conclusion

The <applet> tag represents a piece of web history, reflecting a time when browsers needed external plug-ins to handle multimedia content. Today, HTML5 provides native support for various media types, making the <applet> tag obsolete. Developers should utilize modern tags like <video>, <audio>, <embed>, and <object> to achieve similar functionality without relying on outdated technology.