<iframe>

The inline frame element embeds another HTML document into the current page.

Since HTML 4.0 Spec ↗

Syntax

<iframe src="url"></iframe>

Examples

<iframe src="https://example.com/widget"
        title="Pricing widget"
        loading="lazy"
        sandbox="allow-scripts"></iframe>
Output
Renders an embedded sandboxed sub-document loaded lazily when scrolled near.

Notes

Always set a descriptive title for accessibility. Use sandbox to restrict capabilities, allow for feature policy, and loading="lazy" for performance.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also