`
`home
`
`html guide
`
`html cheat sheet
`
`css cheat sheet
`
`examples
`
`live demo
`
`search
`
`contact me
`
`Java Applets in HTML
`
`An applet is a Java program that can be included a web page by using HTML tags. The applet tag is
`the simpler but older method, and has been superseeded by the object tag.
`
`Applet - <applet> </applet>
`Add a Java applet by specifying the attributes of the applet tag.
`archive="url" - Address or filename of the Java archive file (.jar) containing the class files.
`code="?" - Java class to run, eg. MyApplet.class
`width="?" - The width of the applet, in pixels.
`height="?" - The height of the applet, in pixels.
`Object - <object> </object>
`Use these attributes of the object tag to include an applet in html:
`archive="url" - Address or filename of the Java archive file (.jar) containing the class files.
`classid="?" - Java class to run, eg. java:MyApplet.class
`codetype="application/java" - The type of object, use application/java.
`width="?" - The width of the object, in pixels.
`height="?" - The height of the object, in pixels.
`
`Example:
`
`Using both applet and object to show an applet
`
`<html><body>
` <p>
` <applet code="Logo.class" archive="Logo.jar"
` width="740" height="400"></applet>
` </p>
` <p>
` <object codetype="application/java" classid="java:Logo.class"
` archive="Logo.jar" width="740" height="400"></object>
` </p>
`</body></html>
`
`See live demo of this example or open in a new window. (Note: close window or tab to return to the guide)
`
`Example:
`
`See the Logo Turtle Graphics Applet web page for more info on how to interact with the Logo
`applet.
`
` |
`
` Feedback
`
`Prev
`
` | Top
`
` | Next
`
`Blue Coat Systems - Exhibit 1074
`
`0001
`
`
`
`29
`
`Guide Topics
`
`What is HTML?
`
`What is CSS?
`
`Essential Tags
`
`The Basics
`
`Section Divisions
`
`Text Formatting
`
`Images
`
`Linking Tags
`
`Lists
`
`Tables
`
`Frames
`
`Forms
`
`
`
`Extra Topics
`
`Miscellaneous
`
`Colour Codes
`
`Special Characters
`
`HTML ISO Codes
`
`JavaScript
`
`Java Applets
`
`YouTube Videos
`
`Other Resources
`
`Get Dropbox! - bonus 500mb using referral link
`
`
`
`www.simplehtmlguide.com
`
`A Simple Guide to HTML - Robert Duncan
`
`0002