PROGRAMMING
<script> </script>
The HTML script tag defines a script code. Scripts can be placed anywhere in the head or body of a document and be defined within the HTML script tag or in an external file.
If the "src" attribute is not present, the script code must be placed as content of the tag:
USAGE EXAMPLE: - Code:
-
<script type="text/javascript">
document.write('This TEXT is generated by script tag!!');
</script>
When the "src" attribute is present, the script must be located in the resource defined by it, and the tag's content may be ignored.
USAGE EXAMPLE: - Code:
-
<script type="text/javascript" src="print.js">
</script>
<noscript> </noscript>
The HTML noscript tag specifies content that should be rendered when a script cannot be executed. This content will be shown in the case that the browser don't support client-side scripts or it's configured not to execute them.
USAGE EXAMPLE: - Code:
-
<script type="text/javascript">
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>
<applet> </applet>
The <applet> tag defines an embedded applet.
The syntax of the <APPLET> tag is shown below:
- Code:
-
<APPLET
[ALIGN = alignment]
[ALT = alternate-text]
CODE = applet-filename or OBJECT = serialized-applet
[CODEBASE = applet-directory-url]
[ARCHIVE = filename.zip/filename.jar]
HEIGHT = applet-pixel-height
[HSPACE = horizontal-pixel-margin]
[MAYSCRIPT = true/false]
[NAME = applet-name]
[VSPACE = vertical-pixel-margin]
WIDTH = applet-pixel-width
>
</applet>
Here is the explanation of each parameter:
ALIGN alignment, optional. Specifies the applet's alignment on the Web page. Valid values are: left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom. Default: left. The alignment values have the same meanings as they do in the <IMG> tag.
ALT alternate-text, optional. The alternate text is displayed when the browser understands the <APPLET> tag but is incapable of executing applets, either because Java is disabled or not supported on the platform. Support of this tag is browser dependent; most browsers just display the alternate-html since that is not restricted to text.
ARCHIVE filename.zip/filename.jar, optional. Points to a comma-separated list of uncompressed ZIP or JAR files that contain one or more Java classes. Each file is downloaded once to the user's disk and searched for the class named in the CODE parameter, and any helper classes required to execute that class. JAR files may be signed to grant additional access. ( JAR files are Java archives, a new archive format defined in Java 1.1. JAR files support features like digital signatures and compression. While they are not yet in wide use, they should become an important way of distributing sets of Java classes.)
CODE applet-filename. This parameter or the OBJECT parameter is required. Name of applet .class file. The .class extension is not required in the <APPLET> tag but is required in the class's actual filename. The filename has to be a quoted string only if it includes whitespace.
CODEBASE applet-directory-url, optional. Relative or absolute URL specifying the directory in which to locate the .class file or ZIP archive for the applet. Default: html directory.
HEIGHT applet-pixel-height, required. Initial height of applet in pixels. Many browsers do not allow applets to change their height.
HSPACE horizontal-pixel-margin, optional. Horizontal margin left and right of the applet, in pixels.
MAYSCRIPT Required for applets that wish to use LiveConnect and the netscape.javascript classes to interact with JavaScript. Set to true to communicate with JavaScript. Set to false, or omit this parameter to disable communication with JavaScript. Both Java and JavaScript must be enabled in the browser.
NAME applet-name, optional. Allows simultaneously running applets to communicate by this name. Default: the applet's class name.
OBJECT serialized-applet. This parameter or the CODE parameter is required. Name of applet saved to a file as a serialized object. When loaded, init() is not called again but start() is. Parameters for running the applet are taken from this <APPLET> tag, not the original.
VSPACE vertical-pixel-margin, optional. Vertical margin above and below the applet, in pixels.
WIDTH applet-pixel-width, required. Initial width of applet in pixels. Many browsers do not allow applets to change their width.
<object> </object>
The OBJECT element is used to include objects such as images, audio, videos, Java applets, and Flash animations. OBJECT is intended to replace the more specific IMG and APPLET elements, as well as the proprietary EMBED and BGSOUND elements, though a lack of browser support and severe bugs in supporting browsers make the other elements a better choice in many cases.
LIVE EXAMPLE:Please visit
Live Demo for demo on object tag
<param>
The <param> tag is used to define parameters or variables for an object or applet element.
LIVE EXAMPLE:Please visit
Live Demo for demo on param tag
With this your HTML tutorial is completed... Thanks for Reading the tutorial and if you guys have any doubt or any difficulty please feel free and do post it in
"PROGRAMMING ARENA " we would be glad to help you out
.
Thanks,
-Arvind