Multiple choice

How do you link a JavaScript file to a web page?

  1. using the alert tag and src property

  2. using the <script> tag and src property

  3. using the document.write and src property

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To include an external JavaScript file, you use the script tag with the src attribute pointing to the file path.