Getting Started: Setting Up your code.
inside the <html> tags of your page. The beginning of your code begins with
As you can see, we began our script with the
The part in red is purely optional, as the browser by default assumes a
validation reasons. The second and next
to last lines of the above example are
//-->, which are HTML comment tags tailored
such a browser, the browser will just "dump" all your code as text onto the
screen, in other words, not a pretty sight! The only "functional part" of
this script is the
part. It basically writes to the page whatever you put inside the quotation
marks. Don't worry so much about why this is so yet, we will discuss this in
detail later. We end this entire code with
</script> This terminates your
script, and brings you back to html.
for single-lined comments, or
/* comment here */
for multiple ones.
Ok, we are now ready to proceed to some real programming!