What is the purpose of code attribute of applet tags?

Options
- A URL that points to the class of the applet
- A URL to the applet when it is stored in a Java Archive or ZIP file
- Indicates the base URL of the applet if the code attribute is relative
- Defines the horizontal spacing around the applet


CORRECT ANSWER : A URL that points to the class of the applet

Discussion Board
Code attribute of applet tag

<applet>HTML tags are used to check whether the browser is running the desired services to run the application on the browser. So the applet function and tags are useful instead of deploying toolkit function to make things work for the end users.
The applet is launched using Java Network Launch Protocol (JNLP) or by specifying it in the attributes of <applet> tag.

<applet code = 'appletComponentArch.DynamicTreeApplet'
jnlp_href = 'dynamictree_applet.jnlp'
width = 300
height = 300 />
Here:
code is the name of the applet class.
archive is the name of jar file containing the applet and its resources.
width is the width of the applet.
height is the height of the applet.

Rohit Sharma 08-1-2014 04:08 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement