HTML <applet> tag (deprecated)S2C Home   « HTML <applet> tag

Definition

The <applet> tag is used to define an embedded applet in our HTML.

Use the <object> tag to define embedded objects for use in HTML.

Example


<applet code="http://server2client.com/apple.class" 
  width="300" 
  height="200"
  alt=href="http://server2client.com/apple.class">View Apple</a>
</applet>

Required Attributes

The code or object attribute must be used.

code specifies the URL location of the Java applet.


<applet code="http://server2client.com/apple.class"></applet>

object specifies a reference to the applet.


<applet object="aReference"></applet>

Optional Attributes

align - Specifies the alignment of the applet to sourrounding elements.


<!-- Valid values are top, right, bottom, left, middle and baseline -->
<applet code="http://server2client.com/apple.class"
        align="top">
</applet>

alt - Specifies an alternate text for the applet.


<applet code="http://server2client.com/apple.class"
        alt="someAlternateText">
</applet>

archive - Specifies a space delimited list of URLs that are relevant to the applet.


<applet code="http://server2client.com/apple.class"
        align="aURL orURLs">
</applet>

codebase - Specifies a base URL location for the archive, classid and data attributes.


<applet code="http://server2client.com/apple.class" 
        codebase="http://server2client.com/">
</applet>

height - Specifies the height of the applet in pixels.


<applet code="http://server2client.com/apple.class" 
        height="300">
</applet>

hspace - Specifies the horizontal spacing around an applet.


<applet code="http://server2client.com/apple.class" 
        hspace="50">
</applet>

name specifies a name for the applet.


<applet code="http://server2client.com/apple.class"
        name="someName">
</applet>

vspace - Specifies the vertical spacing around an applet.


<applet code="http://server2client.com/apple.class" 
        vspace="50">
</applet>

width specifies the width of the applet in pixels.


<applet code="http://server2client.com/apple.class" 
        width="500">
</applet>

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<applet class="classname"></applet>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<applet id="idname"></applet>

style - specifies an inline style for the element allowing you to apply the style to the content.


<applet style="color:red;text-align:left"></applet>

title - specifies extra information about the content.


<applet title="information about the content"></applet>

Language Attributes

NONE

Event Attributes

NONE

go to home page Homepage go to top of page Top