Alerts
Wishlist
Cart
Sign In
Categories
Current Affairs & GK
Current Affairs
Show All Current Affairs & GK
eBooks
General Aptitude
Arithmetic Aptitude
Data Interpretation
Show All General Aptitude
General Knowledge
Basic General Knowledge
General Science
Show All General Knowledge
Medical Science
Anatomy
Biochemical Engineering
Biochemistry
Biotechnology
Microbiology
Show All Medical Science
Technical
Database
Digital Electronics
Electronics
Networking
Show All Technical
Verbal and Reasoning
Logical Reasoning
Verbal Ability
Verbal Reasoning
Show All Verbal and Reasoning
›
What is the correct syntax for referring to an external script called 'script.js
What is the correct syntax for referring to an external script called 'script.js'?
Expand All
Collapse All
Practice Questions
1 question
Q1
What is the correct syntax for referring to an external script called 'script.js'?
<script src='script.js'>
<script href='script.js'>
<script name='script.js'>
<script file='script.js'>
Show Solution
Copy
The correct syntax for referring to an external script is <script src='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
Show Steps
Step 1: Open your HTML file where you want to include the external script.
Step 2: Find the place in your HTML where you want to add the script. This is usually before the closing </body> tag.
Step 3: Type the opening tag for the script: <script.
Step 4: Add the 'src' attribute to specify the source of the script: src='script.js'.
Step 5: Close the opening script tag with a >: <script src='script.js'>.
Step 6: Close the script tag with </script> to complete it: <script src='script.js'></script>.
Related Questions
W
What does API stand for?
Question: What does API stand for?Options: Application Programming InterfaceApplication Protocol Int..
W
Which CSS property controls the text size?
Question: Which CSS property controls the text size?Options: font-sizetext-sizefont-styletext-styleC..
W
What is the purpose of the 'fetch' API in JavaScript?
Question: What is the purpose of the \'fetch\' API in JavaScript?Options: To retrieve data from a se..
W
What does HTTP stand for?
Question: What does HTTP stand for?Options: Hyper Text Transfer ProtocolHigh Text Transfer ProtocolH..
W
Which of the following is a JavaScript framework?
Question: Which of the following is a JavaScript framework?Options: ReactBootstrapjQueryCSSCorrect A..
‹
Biology (School & UG)
Chemistry (School & UG)
Civil Engineering
Commerce & Accountancy
Computer Science & IT
Current Affairs & GK
Data Structures & Algorithms
eBooks
Electrical & Electronics Engineering
English (School)
General Aptitude
General Knowledge
General Knowledge & Current Affairs
Languages & Literature
Law & Legal Studies
Major Competitive Exams
Mathematics (School)
Mechanical Engineering
Medical Science
Physics (School & Undergraduate)
Quantitative Aptitude & Reasoning
Social Science (School)
Technical
Verbal and Reasoning
Vocational & Skill Development
›
Soulshift Feedback
×
On a scale of 0–10, how likely are you to recommend
The Soulshift Academy
?
0
1
2
3
4
5
6
7
8
9
10
Not likely
Very likely
✕
↑