Module iframe

Module iframe 

Source
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 embed
  • width/height: Dimensions of the iframe
  • sandbox: Security restrictions for the embedded content
  • loading: Lazy loading behavior
  • allow: 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>

§WHATWG Specification

Constants§

ALLOW
The allow attribute.
HEIGHT
The height attribute.
LOADING
The loading attribute.
NAME
The name attribute.
REFERRERPOLICY
The referrerpolicy attribute.
SANDBOX
The sandbox attribute.
SRC
The src attribute.
SRCDOC
The srcdoc attribute.
WIDTH
The width attribute.