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
link
B
ext
C
script
D
src
Question 2
"async" attribute is used to include External JS Code Asynchronously.
<script src="main.js" async="async"></script>
A
True
B
False
Question 3
Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts)
A
parse
B
async
C
defer
D
type
Question 4
______ attribute is used to specify the character encoding used in an external script file.
A
type
B
None of These
C
charset
D
character
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.