CodeZettaInterview Hub

HTML · Media · Mid-Level · Best Practice

How does lazy loading images work in HTML?

Short Interview Answer

loading="lazy" defers offscreen images; still provide dimensions to reduce CLS.

Detailed Explanation

Critical LCP images should not be lazy. Native lazy is simpler than IntersectionObserver for many cases.

Did you know this answer?