Core java tutorial for beginners
A tutorial blog which explains different core concepts related to Java along with programming examples
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.
Java Programming » Applets » Applet Tag
Suryateja Pericherla Categories: Applets. No Comments on Applet Tag
Join Our Newsletter - Tips, Contests and Other Updates
Email
Name

In this article we will learn about the applet tag and its various attributes along with description of each attribute and sample HTML code.

 

This article is a part of our core java tutorial for beginners.

 

applet Tag Attributes

Following are the various attributes of applet tag:

  • code: Used to specify the name of the applet class.
  • codebase: Used to specify the location at which the applet code (class) is available.
  • width: Used to specify the width of the applet display area.
  • height: Used to specify the height of the applet display area.
  • name: Used to specify the name of the applet which is helpful in distinguish one applet from another when there are multiple applets in the same webpage.
  • hspace: Used to specify the horizontal space to the left and right of the applet display area.
  • vspace: Used to specify the vertical space to the top and bottom of the applet display area.
  • align: Used to specify the alignment of the applet display area with respect to other HTML elements.

 

Above listed attributes are the most frequently used attributes of the applet tag. Below is sample HTML code using some of the attributes specified above.

<applet code=”MyApplet” codebase=”http://www.abc.com/applets/”

height=”300″ width=”400″

name=”applet1″

hspace=”20″ vspace=”20″>

</applet>

 

Next let’s look at overview of event handling in java.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Note: Do you have a question on this article or have a suggestion to make this article better? You can ask or suggest us by filling in the below form. After commenting, your comment will be held for moderation and will be published in 24-48 hrs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Facebook
Twitter
Pinterest
Youtube
Instagram