Expand description
Attribute names for iframe (<iframe>) elements.
§Purpose
The <iframe> element embeds another HTML document within the current page,
commonly used for third-party widgets, embedded content, or sandboxed applications.
§Common Attributes
src: URL of the document to embedwidth/height: Dimensions of the iframesandbox: Security restrictions for the embedded contentloading: Lazy loading behaviorallow: Feature policy permissions
§Example
<iframe src="https://example.com/widget" width="600" height="400"
sandbox="allow-scripts allow-same-origin"
loading="lazy"></iframe>
<iframe src="untrusted.html" sandbox></iframe>
<iframe srcdoc="<p>Inline HTML content</p>" sandbox="allow-scripts"></iframe>