Posts Tagged ‘HTML’

Hello World!!

Hello World! is a simple JavaScript programme exercise designed to output the text “hello world” introducing you to a programming language, that shows you how to write, compile and execute programs using that language.

JavaScript, official name is ECMA script, is a scripting language so it does not need to be compiled – instead it is executed directly by the web browser –  but you still have to write the code and attach it to your web page.

The first thing you need to do is add some HTML to the body of your web page, in the form of the opening, and closing script tag. They form a container in to which you place your javascript code. The tags surrounding the code identify it as JavaScript code to be executed rather than code to be displayed. Other areas of your web page where JavaScript can be included is the head, and within the parameters of your html tags.

You place the JavaScript code in to the body of your page as we intend to use JavaScript to display something your page. The JavaScript tags and code have to be positioned at a specific point on your page at a place where we want otput from the script to appear.