How do you include JavaScript in an HTML document?
-
A
<script src="script.js"></script>
Correct answer
-
B
<java src="script.js"></java>
-
C
<js src="script.js"></js>
-
D
<code src="script.js"></code>
Correct answer
A. <script src="script.js"></script>
7 views
Explanation
JavaScript is added to HTML with the
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ