Multiple choice technology web technology

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

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

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

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

  4. <script id="xxx.js">

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

The HTML `tag uses thesrc(source) attribute to link external JavaScript files like "xxx.js". Usinghrefis incorrect because it is reserved for stylesheets and links, whilenameandid` are used for identifying elements, not loading external files.