Tutorial 12: Embed with HTML - Page 9 - HTML with Style
Tutorial 12: Embed with HTML - Page 9
If you're going to use the APPLET element in your pages, then one of two things are happening: Either you are a Java programmer, in which case the details of the APPLET element will be something you already know, or you are using an applet developed by someone else, in which case you will probably have recieved instructions about the use of this element. The precise values of the code, archive and name attributes largely depend on the applet you're using.
The only note I want to make here from the HTML and CSS author's point of view is that the contents of the APPLET element can be used to provide alternate content in case the applet cannot be displayed, just like the OBJECT element, so don't forget to do that. As an example, here's the code used to embed the Colorizer into a Web page (I won't bother showing you the results here. If you want to see the Colorizer in action check it out):
<APPLET CODE="Colorizer.class" CODEBASE="classes/" WIDTH="600" HEIGHT="390" > <H1>The Colorizer</H1> <P>Your browser cannot run the Colorizer. This could be due to one of the following reasons:</P> <OL> <LI>You have disabled the execution of Java applets in your browser's preferences (enable them).</LI> <LI>Your browser does not support Java applets (get a new browser, or get the Java Activator plug-in).</LI> <LI>Your browser supports a version of the Java API earlier than 1.0 (get a new browser, or get the Java Activator plug-in).</LI> </OL> <P>You can get more information on the Colorizer in the <A HREF="help.html">help page</A></P> </APPLET>
In this tutorial, you learned both theoretical and practical ways of embedding objects in HTML documents. For the most part, you'll be using this knowledge to embed images, however, when we have wide-spread adoption of the OBJECT element, we can hope for better integration of multimedia and interactivity with HTML. In the meantime, pay special attention to the guidelines I have given you concerning alternate content when embedding objects so that no one will feel cheated or be unable to read your pages. Try your hand at the exercises to see if you got the hang of it all.
Produced by Stephanos Piperoglou
Created: May 28, 1998
Revised: February 25, 1999