HTML <iframe> loading Attribute
Example
<iframe src="https://www.youtube.com/embed/KrM107U_uRg" loading="lazy">
Your browser does not support iframe element.
</iframe>
Meaning
The loading attribute indicates how the browser should load the iframe.
Standard Syntax
<iframe loading="eager|lazy">
Advertisement
Attribute Values
| Value | Description |
|---|---|
| eager | Load the iframe immediately, regardless if it is outside the visible viewport (this is the default value). |
| lazy | Defer loading of the iframe until it reaches a calculated distance from the viewport, as defined by the browser. |