Script Tags
This set of tags is called a JavaScript Block. What the tags do is to tell the browser that a set of insturctions must be loaded into the the browser BEFORE the page contents, because someting in the contents/body will need the instructions to be able to work.
ex. If the web page has a DATE function:
These instructions that tell the web browser to get the date from the main server.
<script="JavaScript">
<!--
JavaScript code goes here
//-->
</script>
The first line <script="JavaScript"> tells the browser to expect and load a set of JavaScript instructions.
<!-- and //--> tell olderversions of browsers to ignore the Javascript block and NOT to print the code as part of the body text.
The last line </script> tells the browser that the set of instructions have finished.
It can be easier to put the JavaScript instructions in a seperate file and link to it. This is especially useful if you reuse the same script/instructions on serveal pages. That way if you need to change the script/instructions you only have to edit the ONE file and not every page you have put the script into.
<script language="JavaScript" src="file.js"></script>
This line both tells the browser that it both needs to load a block of JavaScript instructions, but also src="file.js" give the browser the relative address of the file - where to look and find the file.
Style set of tags informs the browser to expect and load CSS - Cascading Style Sheet information.
<style type="text/css">
<!--
Cascading Style definitions go here
-->
</style>
The first line <style type="text/css"> informs the browser that the script block is CSS.
<!-- and //--> tell olderversions of browsers to ignore the CSS block and NOT to print the code as part of the body text.
The last line </style> tells the browser that the set of definitions have finished.
Again, it can be easier to put the CSS definitions into a seperate file and link to it. This is especially useful if you reuse the same definitions throught the site. That way if you need to change the definitions you only have to edit the ONE file and not every page you have put the script into.
<link rel="StyleSheet" href="" type="text/css">
This line both tells the browser that it both needs to load a block of CSS definitions, and also href="" give the browser the relative address of the file - where to look and find the file.
|