Multiple choice technology web technology

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

  1. <script type="text/javascript" name="javascript.js">

  2. <script type="text/javascript" src="javascript.js">

  3. <script type="text/javascript" href="javascript.js">

  4. <script type="text/javascript" link="javascript.js">

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

The correct HTML tag to include an external JavaScript file is `with thesrcattribute pointing to the script's URL. Attributes likehref,link, orname` are incorrect for linking scripts in HTML.