Welcome to Our Free Tutorial!

HTML Scripts

A script is a small, embedded program that you can add interactivity to your website. For example, a script generate a pop-up alert box message, or provide a dropdown menu.

There are two very popular scripts that are commonly used in HTML to make web pages. HTML javascript and HTML vbscript are very useful scripting languages to know.

If your want to insert javascript code into your HTML you should use the script tag. The <script> tag between the <head> </head> tags. This ensure the ready to run when it is called.

 <script type="text/javascript ">
alert("I am a script. I ran first!")
< /script>

Javascript you set the type attribute equal to "text/javascript",

Lets say you want to a message to display in the status bar when the user hovers over a link. The event handled by the onmouseover event handler. You add the onmouseover attribute to the HTML tag.

HTML Code:

 Stress is the <a href="http://www.aonestudy.com"
  onMouseover="window.status=' Wear
and tear, our bodies experience '; return true"> we adjust to our continually changing </a>


Stress is the we adjust to our continually changing
Status bar messages are not supported by all the browers, If you see no change on the status bar it means browser doesn’t support this piece of javascript.

HTML Vbscript how to use

 <script type="text/vbscript">
***The vbscript code should go in this spot***
For VBScript you set the type attribute equal to "text/vbscript",