<container>
<script>
</container>
tag?
Which file extension is used for JavaScript files?
A). .java
B). .js
C). .javascript
D). .jsx
Which HTML tag is used to link an external JavaScript file?
A). <container>
<script>
</container>
B). <container>
<link>
</container>
C). <container>
<style>
</container>
D). <container>
<js>
</container>
What happens if the external JavaScript file is not found?
A). The browser will ignore the script
B). The browser will show a 404 error
C). The script will not run
D). All of the above
How do you include an external JavaScript file in an HTML file?
A). <container>
<script src='filename.js'>
</container>
B). <container>
<script href='filename.js'>
</container>
C). <container>
<script link='filename.js'>
</container>
D). <container>
<script file='filename.js'>
</container>
What is the advantage of using external JavaScript files?
A). Improves code readability
B). Allows reuse of code
C). Improves page load times due to caching
D). All of the above
What does the async attribute do when used in a <container>
<script>
</container>
tag?
A). Executes the script immediately
B). Delays script execution until HTML parsing is complete
C). Executes the script asynchronously
D). Executes the script before the HTML parsing begins
Can an external JavaScript file contain HTML?
A). Yes
B). No
C). Only if it is within a <container>
<script>
</container>
tag
D). Only if it is within a <container>
<body>
</container>
tag
Can an external JavaScript file be cached by the browser?
A). Yes
B). No
C). Only if specified in the HTML
D). Only if it is under a certain size
What attribute is used to specify the path of an external JavaScript file?
A). href
B). src
C). path
D). file
What is the effect of using the defer attribute in the <container>
<script>
</container>
tag?
A). The script will be executed after the HTML document has been fully parsed
B). The script will be executed as soon as it is downloaded
C). The script will not be executed
D). The script will be executed before the HTML document is parsed