JavaScript Comments
Qus. 1 : How do you correctly link an external JavaScript file to an HTML document?
- <script src="script.js"></script>
- <javascript src="script.js"></javascript>
- <link href="script.js" rel="script">
- <script href="script.js"></script>
- <script href="script.js"></script>
- <script> alert('Hello, World!'); </script>
- <js> alert('Hello, World!'); </js>
- <style> alert('Hello, World!'); </style>
- Multiple <script> tags can be used in the same HTML document
- The <script> tag can only be placed in the <head> section
- The <script> tag can only be used once in an HTML document
- The <script> tag must always reference an external file
- JavaScript must always be placed inside the <head> tag
- JavaScript can be placed either in the <head> or <body> tag
- JavaScript can only be placed in external files
- JavaScript cannot be placed in the <head> tag