The <script> tags can be either included in the head section of the web page or in the body section of the web page. It is valid to specify multiple <script> blocks in a single web page. When there are multiple scripts, they are executed from top to bottom.
- Makes HTML file cleaner and easy to understand.
The syntax for line comment is as shown below:
// This is a line comment. This is used for writing single line comments.
The syntax for block comment is as shown below:
This is block comment.
This is used to write multi-line comments.
Instead of not doing anything, it will be more informative if the browser displays some sort of warning or error message. This can be achieved by using the <noscript> tag provided by HTML. Below example demonstrates the use of <noscript> tag:
Internet Explorer 4.0 or higher is required to view the web page. Upgrade your browser and try again.