Applet Tag (<applet>)

It is known as applet tag. It has both start <applet> and end </applet> tag. This tag is used to define an embedded applet. To include applets into your program, you have to use the <object> tag. An <applet> tag is not supported by all the commonly using browsers, it is only supported by the Internet Explorer, Mozilla Fire Fox and Safari, but the <applet> tag requires some additional plug-ins or installations to work.

The <applet> tag is supported by some standard and it has also some other attributes but this tag is not supported by any event attributes. So some of the standard and other attributes are given below-

Standard attributes supported by the <applet> tag-

Attribute Description
class It is used to specify the classname for an element
id It is used to specify the unique id of an element
style It is used to specify an inline style of an element
title It is used to specify an extra information about an element

 

Other attributes supported by the <applet> tag-

Attribute Description
align It is used to specify the alignment –whether it is top, bottom, left, right, middle or baseline- of the <applet> according to the surrounding elements
alt It is used to specify an alternate text for an <applet>
archive It is used to specify the location of the archive file
height It is used to specify the height of an <applet>
width It is used to specify the width of an <applet>
hspace It is used to specify the horizontal spacing around the <applet>
vspace It is used to specify the vertical spacing around the <applet>
name It is used to specify the name of an <applet> during coding

 

Example-

<html>
<body>

<applet code="Flowers.class" width="450" height="450">
Java applet is able to draw an animated flowers. </applet>

</body>
</html>

Output-

Java applet is able to draw an animated flowers.
Toggle Sidebar