Home »
MCQs »
JavaScript MCQs
Which is the correct syntax to call an external JavaScript file in the current HTML document?
8. Which is the correct syntax to call an external JavaScript file in the current HTML document?
- <script src="jsfile.js"></script>
- <script href=" jsfile.js"></script>
- <import src=" jsfile.js"></import>
- <script link=" jsfile.js"></script>
Answer: A) <script src="jsfile.js"></script>
Explanation:
The correct syntax to call an external JavaScript file in the current HTML document is:
<script src="jsfile.js"></script>