Besides standalone applications, Java's main use on the client side, that is, in the user's browser, is to create applets, small programs that download over the Internet and run inside Web browsers. Because of Java's cross-platform nature, these applets should run identically on any Java-enabled browser. In recent years, we've seen many Java applets for browsers replaced by Macromedia Flash animations, which are generally easier to create than Java applets.
You embed Java applets in your Web pages using the <object> HTML tag, with additional information specifying the applet. When the browser sees the <object> tag, it downloads the Java applet from the server, and the applet then runs in the area of the screen specified in the tag (Figure 1.1).
Figure 1.1. This Java applet plays a mean game of checkers.
To learn more about Java, we recommend Java 2 for the World Wide Web: Visual QuickStart Guide by Dori Smith.