HTML Attributes

HTML loading attribute

Hints whether supported images or iframes should be loaded immediately or deferred until near the viewport. Avoid lazy-loading the likely largest visible content at the top of the page. Applicable elements include <iframe> and <img>; the current HTML Living Standard also defines loading on <audio> and <video>. Media-element support needs separate verification. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.

Formal Syntax & Structure

html syntaxhtml
loading="lazy"

Parameters & Attributes

NameTypeDescription
loadingenumerated: eager, lazyHints whether supported images or iframes should be loaded immediately or deferred until near the viewport. Avoid lazy-loading the likely largest visible content at the top of the page.

Working Example

Example Snippethtml
<img src="gallery.jpg" alt="Gallery" loading="lazy" width="400" height="250">

Browser Compatibility

Minimum supported versions across modern rendering engines

Blink (modern)
Chrome
77
Yes
Gecko
Firefox
75
Yes
WebKit
Safari
15.4
Yes
Support for lazy image loading on img; iframe support is separate. This is retained historical source evidence, not a new browser test.
HTML Living Standard
HTML Reference