Java applet are programs that reside on web page. A web page is basically made up of text and HTML tags that can be interpreted by a web browser or an applet viewer.
Java source code, it can be prepared using any ASCII text editor.
A web page is also called HTML page or HTML document.
A Web pages are stored using a file extension .html such as my Applet.html. Such files are referred to as HTML files.
HTML files should be stored in the same directory as the compiled code of the applets.
A web page is marked by an opening HTML tag <HTML> and closing HTML tag </HTML> and is divided into the following three major parts:
This section contains title, heading and sub heading of the web page. The head section is defined with a starting <Head> tag and closing </Head> tag.
<Head> <Title>Hello World Applet</Title> </Head>
After the Head Section the body section comes. This is called as body section because the entire information and behaviour of the web page is contained in it, It defines what the data placed and where on to the screen. It describes the color, location, sound etc. of the data or information that is going to be placed in the web page.
<body> <h1>Hi, This is My First Java Applet on the Web!</h1> </body>