What is the function of the 'defer' attribute in a script tag? MCQ with Answer and Explanation

What is the function of the 'defer' attribute in a script tag?
A. To prevent script from running
B. To delay script execution until the page has parsed
C. To load the script after page load
D. To execute the script asynchronously
Answer: Option B
Solution (By JKSSB Mock Tests)
The defer attribute tells the browser to continue parsing the HTML while the script downloads, and execute it after the document is parsed, in order.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Internet and Web Technologies Questions

Question #1
What is the primary function of a 'DNS Resolver' component operating within an internet access loop?
A. To clear temporary cookie tracker records automatically
B. To accept a domain name lookup request from a client device, query authoritative nameservers, and return the correct numerical IP address
C. To format structural web layout dimensions on screen
D. To filter out malicious spam emails from incoming inbox mailboxes

Correct Answer: Option B


Explanation:
The DNS resolver acts as an intermediary, processing domain name requests from client applications by querying the DNS hierarchy to fetch the target server's IP address.

This question belongs to: Computer Internet and Web Technologies
Question #2
What structural element forms the separator dividing individual query parameter pairs inside a standard URL structure, such as '?id=1&page=2'?
A. The ampersand (&) character
B. The hash (#) character
C. The forward slash (/) character
D. The colon (:) character

Correct Answer: Option A


Explanation:
In a URL query string, the question mark (?) initiates the parameters, while individual key-value pairs are separated from each other using the ampersand (&) character.

This question belongs to: Computer Internet and Web Technologies
Question #3
Which type of internet connection method relies on existing analog copper telephone network lines to deliver high-bandwidth digital data streams without blocking traditional voice calls?
A. Coaxial Fiber Grid
B. DSL (Digital Subscriber Line)
C. Satellite Link Array
D. Dial-up Connection

Correct Answer: Option B


Explanation:
DSL uses high-frequency bands over copper telephone wires to run continuous, high-speed internet data transmissions alongside standard voice calls.

This question belongs to: Computer Internet and Web Technologies