JavaScript is used in millions of Web pages to improve the design, validate forms, detect Browsers, create cookies, and much more.

Before you continue you should have a basic understanding of the HTML. And many people have confusion regarding Java and JavaScript are same but both are completely different language in concept and design.

What can a JavaScript Do ?

        JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small parts of code into their HTML pages.
        JavaScript can put dynamic text into an HTML page - A JavaScript statement can write a variable text into an HTML page.
        JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element.
        JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element.
        JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing.
        JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser.
        JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer.

Writing JavaScript code

The HTML <script> tag.

<script language="JavaScript">

document.write ("Visions Developer!")



To insert a JavaScript into an HTML page, we use the <script> tag
So, the <script language="JavaScript"> and </script> tells where the JavaScript starts and ends
The word document. Write is a standard JavaScript command for writing output to a page By entering the document. Write command between the <script language="JavaScript"> and </script> tags, the browser will recognize it as a JavaScript command and execute the code line. In this case the browser will write Visions Developer! to the page.