<APPLET> Tag & its Attribute

HTML Tag <APPLET>

<APPLET> Embeds a Java applet object into an HTML document. Typically, items that appear inside the <APPLET> tags allow browsers that do not support Java applets to view alternative text. Browsers that do support Java ignore all information between the <APPLET> tags.

Attribute of <APPLET> Tag

ALIGN

Specifies the horizontal alignment of the Java applet displayed. For example, a value of CENTER tells the browser to place the applet evenly spaced between the left and right edges of the browser window.

<APPLET ALIGN=CENTER
CODE="http://www.cs-tutorial.com/
checkers.class">
You lose. Would you like to play again?
Hit the RELOAD button.<BR>
</APPLET>


Possible Values

LEFT
CENTER
RIGHT



ALT

Displays a textual description of a Java applet, if necessary.

<APPLET CODE="http://www.cs-tutorial.com/
login.class">ALT="A login process">
We could have had a relaxing game of
checkers if your browser supported
Java applets. I'll gladly play with
you if you enable Java applets or
upgrade to a browser that 


Possible Values

Any text message.



CODE

Specifies the relative or absolute location of the Java bytecode file on the server.

<APPLET CODE="http://www.cs-tutorial.com/
login.class">
Dang! Your browser does not support
Java applets. You may want to consider
installing a newer web browser.
</APPLET>


Possible Values

.class file name.



CODEBASE

Specifies the directory where you can find all necessary Java class files on the WWW server. If you set this attribute, you need not use explicit URLs in other references to the class files. For example, you would not need an explicit reference in the CODE= attribute.

<APPLET
CODEBASE="http://www.cs-tutorial.com/
login.class" CODE="login_page.html">
If your browser supported inline Java
applets, you'd be looking at a very
attractive checkerboard right now.
</APPLET>


Possible Values

Any URL



HEIGHT

Specifies the height (measured in pixels) of the Java applet object within the document.

<APPLET HEIGHT="200" CODE="login.class">
Since your browser does not support inline
Java applets, we won't be playing checkers
today. </APPLET>


Possible Values

Any Integer value.



HSPACE

Specifies an amount of blank space (measured in pixels) to the left and right of the Java applet within the document.

<APPLET HSPACE="10"
CODE="login.class">
Sorry. Due to the fact your browser
does not support embedded Java
applets, you'll have to play checkers
the old way today.
</APPLET>


Possible Values

Any Integer value.



NAME

Assigns the applet instance a name so that other applets can identify it within the document.

<APPLET SRC="login.class" NAME="Checkers">
</APPLET>


Possible Values

URL



PARAM NAME

Passes program parameters to the Java applet.

<APPLET CODE="login.class"
PARAM COLOR="red">
Since your browser does not support
inline Java applets, I win this game
of checkers by forfeit.
</APPLET>


Possible Values

Any parameter name with value.



TITLE

Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the embedded applet.

<APPLET SRC="/java/login.class"
TITLE="Thing">


Possible Values

URL



VSPACE

Specifies the amount of vertical space (measured in pixels) above and below the Java applet.

<APPLET VSPACE="10"
CODE="/login.class">
If you had a Java-capable browser, you
could be playing checkers!
</APPLET>


Possible Values

Any Integer Number.



WIDTH

Specifies the width (measured in pixels) of a Java applet within a document.

<APPLET WIDTH="350"
CODE="/login.class">
Checkers can be a lot of fun, but it's
more fun if your browser supports Java.
Sorry.
</APPLET>


Possible Values

Any Integer Number.




CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz