Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the defer attribute on a script tag do?

  1. A Downloads the script in parallel and executes it after HTML parsing completes
  2. B Prevents the script from loading
  3. C Executes the script immediately, blocking the parser
  4. D Loads the script only on user interaction
Answer

Downloads the script in parallel and executes it after HTML parsing completes

defer preserves execution order and runs before DOMContentLoaded. async also downloads in parallel but executes as soon as it arrives, in no guaranteed order.

All Front end Development MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as