JavaScript MCQ : JS Basics (Multiple Choice Questions)


Question 1
Which of the following Attribute is used to include External JS code inside your HTML Document -
A
ext
B
link
C
script
D
src
Question 2
"async" attribute is used to include External JS Code Asynchronously.
<script src="main.js" async="async"></script>
A
False
B
True
Question 3
Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts)
A
async
B
type
C
defer
D
parse
Question 4
______ attribute is used to specify the character encoding used in an external script file.
A
charset
B
None of These
C
character
D
type
Question 5
The async attribute can be set in the following ways -
A
<script async>
B
<script async="">
C
<script async="async">
D
All of These
There are 5 questions to complete.