Applet Tag

The <Applet...> tag supplies the name of the applet to be loaded and tells the browser how much space the applet requires.

The ellipsis in the tag <Applet...> indicates that it contains certain attributes that must specified.

The <Applet> tag given below specifies the minimum requirements to place the Hellojava applet on a web page.

code = "Hellojava.class"
width = 400
Height = 200 >

This HTML code tells the browser to load the compiled java applet Hellojava.class, which is in the same directory as this HTML file.

It also specifies the display area for the applet output as 400 pixels width and 200 pixels height.

We can make this display area appear in the center of screen by using the CENTER tags as showsn below:


The applet tag discussed above specified the three things:

  1. Name of the applet
  2. Width of the applet (in pixels)
  3. Height of the applet (in pixels)

Share this article on