Any applet is displayed inside an HTML document. To do this, you need to know a few basics about how HTML documents are structured.
HTML code is simply pure text surrounded by tags. If fact, an html document is really a text document that contains special tags in it.
Tags start with a < bracket and end with a > bracket. Most tags have an opening tag and an ending tag. The ending tag is the same as the opening tag but starts with a slash at the front. For example, the main part of an html document is the body. It starts with a <body> tag and ends with a </body> tag.
Here is the basic template of all HTML documents:
In order to add an applet to an HTML document, you need to place the following code in between the opening and closing <body> tags:
<applet
code=Filename.class width=500 height=400>
</applet>
Of course, you need to specify the filename of your file. You can also set the width and height to any value you wish.
C) FINAL PRODUCT
<html>
<head>
</head>
<body>
<applet
code=FileName.class width=500 height=400>
</applet>
</body>
</html>
Click here for a text file containing this code.