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 execute the script asynchronously
C. To delay script execution until the page has parsed
D. To load the script after page load
Answer: Option C
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
Which specific protocol operates inside network environments to enable secure communication tunnels, replacing legacy unencrypted routing options for terminal management?
A. HTTP plain text standards
B. POP3 server paths
C. SMTP protocol loops
D. SSH (Secure Shell)

Correct Answer: Option D


Explanation:
SSH utilizes public-key cryptography to authenticate remote systems and encrypt communications, providing a secure alternative to unencrypted protocols like Telnet.

This question belongs to: Computer Internet and Web Technologies
Question #2
What is the purpose of the 'XMLHttpRequest' object in JavaScript?
A. To send and receive data from a server asynchronously
B. To style web pages
C. To parse XML documents
D. To handle events

Correct Answer: Option A


Explanation:
XMLHttpRequest is an API in JavaScript that allows web pages to make HTTP requests to servers asynchronously, enabling AJAX.

This question belongs to: Computer Internet and Web Technologies
Question #3
What does the acronym WWW stand for in the context of the Internet?
A. World Wide Wireless
B. World Wide Work
C. World Wide Web
D. Web World Wide

Correct Answer: Option C


Explanation:
WWW stands for World Wide Web, which is an information system where documents and other web resources are identified by URLs and can be accessed via the Internet.

This question belongs to: Computer Internet and Web Technologies