Q. What is the use of “defer” attribute?

  • (A) it defers rendering of html page
  • (B) it defers script execution until the page has been rendered
  • (C) it defers rendering of css attributes
  • (D) it is only for internal scripts
πŸ’¬ Discuss
βœ… Correct Answer: (B) it defers script execution until the page has been rendered
Explanation: the defer attribute is a boolean attribute. the script is executed after the page has finished parsing. the defer attribute is used if and only if there is src attribute. defer is for external not internal scripts.

Explanation by: Mr. Dubey
the defer attribute is a boolean attribute. the script is executed after the page has finished parsing. the defer attribute is used if and only if there is src attribute. defer is for external not internal scripts.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
239
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate