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

Practice Questions

1 question
Q1
What is the correct syntax for referring to an external script called 'script.js'?
  1. <script src='script.js'>
  2. <script href='script.js'>
  3. <script name='script.js'>
  4. <script file='script.js'>

Questions & Step-by-step Solutions

1 item
Q
Q: What is the correct syntax for referring to an external script called 'script.js'?
Solution: The correct syntax for referring to an external script is <script src='script.js'>.
Steps: 6

Related Questions

Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely