Iframe
An iframe, or inline frame, is an HTML element that embeds another HTML document within the current page. The embedded document runs in its own browsing context, with its own window and document, while being visually contained within the parent page. The content can be from the same origin or from a different one, depending on the source URL provided.
The iframe is defined by the iframe tag. The src attribute specifies the URL of the embedded
Security and privacy considerations are important with iframes. Because the embedded content may originate from another
Common uses include embedding third-party widgets, video players, maps, advertisements, or other content from external sites.
Accessibility and performance considerations matter: provide a descriptive title, and consider lazy loading with loading="lazy" to