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?

  1. <script src="jsfile.js"></script>
  2. <script href=" jsfile.js"></script>
  3. <import src=" jsfile.js"></import>
  4. <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>

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.