1. Home
  2. Computer Science MCQs
  3. HTML
  4. What does loading="lazy" on an element do?

Added 2 Nov 2026

What does loading="lazy" on an <img> element do?

  1. Prevents the image from being cached
  2. Loads the image at a lower resolution
  3. Loads the image only after a user clicks it
  4. Delays loading until the image nears the viewport Correct answer

Correct answer

D. Delays loading until the image nears the viewport

17 views

MCQSEXAM

Explanation

Native lazy loading saves bandwidth and speeds up initial page load. Images above the fold should not be lazy-loaded, because that can hurt Largest Contentful Paint.

Reference

Asked in: NTS, Web Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? 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