Multiple choice technology

What is the correct syntax for referring to an external script called "xxx.js"?

  1. <script name="xxx.js">

  2. <script src="xxx.js">

  3. <script href="xxx.js">

  4. none

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

The src attribute in the tag references an external JavaScript file. The name and href attributes are not valid for this purpose.