A Simple JavaScript Program:-
You should place all your JavaScript code within <script> tags (<script> and </script>) if you are keeping your JavaScript code within the HTML document itself. This helps your browser distinguish your JavaScript code from the rest of the code. As there are other client-side scripting languages (Example: Vb-script), it is highly recommended that you specify the scripting language you use. You have to use the type attribute within the <script> tag and set its value to text/java-script like this:
<script type=”text/java script”>