Designing a Web Page Applet Tag

Designing a Web Page Applet Tag

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:

  1. Comment Section
  2. Head Section
  3. Body Section

Comment Section

This is very first section of any web page containing the comments about the web page functionality. It is important to include comments that tell us what is going on in the web page. A comment line begins with <! And ends with a > and the web browsers will ignore the tesxt enclosed between them. The comments are optional and can be included anywhere in the web page.

Head Section

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.

<Title>Hello World Applet</Title>

Body Section

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.

<h1>Hi, This is My First Java Applet on the Web!</h1>

Share this article on