Home Tutorial Html Html5 HTML5 output tag, Example of <script> tag in HTML5.


Share on Google+Share on Google+
HTML5 output tag, Example of <script> tag in HTML5.
Posted on: September 13, 2010 at 12:00 AM
In this section, you will see the Implementation of <script> tag.

HTML5 output tag, Example of <script> tag in HTML5.

The <script> tag is most important for dynamic page. It is use for adding capability of scripting language in HTML document. Scripting language is use for client-side validation. With the help of script's event, you can link form controls from script for providing graphical user interface.

User can not see the code of script. You can put it any where in HTML document either head or body. You can put script code either within document or outside the document.

Attribute of option:
There are following attributes......

Attributes Value Description
async string Specify script execute asynchronously 
src URL Address of external script file.
defer  defer script will be execute after loading page.
type  MIME type
"text/vbscript" etc
define the type of script,

Declaration Syntax :

Declaration syntax of <script> in HTML5.

                      <script   type=""> scripting code </script   >

Example of <output> in HTML5:

<!doctype html >
<html ><head>
<title>Document title.</title>
<script type="text/javascript">
function multi()
alert("Script embed page.");
<body onload="multi()">
<h1>script tag Example.</h1>
<p><b>Implementation of &lt;script &gt; in HTML5.</b></p>
<p><strong>Output of script code.</strong></p>
<script type="text/javascript">
document.writeln("Bharat Singh");

Download this code


Difference Between HTML5 and HTML4.01:

The <output> tag is available in both HTML5. It is not present in HTML4.01.


Related Tags for HTML5 output tag, Example of <script> tag in HTML5.:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 13, 2010

Recommend the tutorial

Advertisements Advertisements