The external JavaScript file must contain the <script> tag
-
True
-
False
External JavaScript files should contain only pure JavaScript code without any HTML markup. The tag is an HTML element that belongs only in the HTML document that references the external file. Including <script> tags in an external .js file would cause syntax errors because the browser expects JavaScript, not HTML.
To answer this question, you need to understand how external JavaScript files are linked to HTML documents.
Option A) True - This option is incorrect because the external JavaScript file does not need to contain the `tag. Instead, the<script>tag is used in the HTML document to reference the external JavaScript file using thesrcattribute. The<script>tag in the HTML document should look like this:<script src="external.js">`, where "external.js" is the name of the external JavaScript file.
Option B) False - This option is correct because the external JavaScript file does not need to contain the `` tag.
The correct answer is B) False.