1. Home
  2. Computer Science MCQs
  3. HTML
  4. What does the defer attribute do on an external tag?

Added 2 Nov 2026

What does the defer attribute do on an external <script> tag?

  1. Runs it after parsing, in order Correct answer
  2. Runs it only when the user scrolls
  3. Prevents the script from ever running
  4. Runs it immediately and blocks parsing

Correct answer

A. Runs it after parsing, in order

15 views

MCQSEXAM

Explanation

defer downloads in parallel without blocking, then executes after parsing, in the order the scripts appear. async runs as soon as the script downloads, in any order.

Reference

Asked in: NTS, Web Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More HTML MCQs

Practise all HTML MCQs

Similar MCQs