Anatomy

An iFrame container featuring externally sourced content
- iFrame container: Container on a page that displays externally sourced content.
Usage
Use iFrame to display relevant web-based content.
Configurations
Learn how to customize iFrame by configuring the available properties.
Title
Name for your iFrame content title. Default is “Wikipedia home page.”
Source
URL for your external content. The default is ”https://wikipedia.com.”
Permissions allowed
A permissions policy defines what functionality is available to the iFrame. This lets you enforce best practices, as well as more safely compose third-party content.
By default, accelerometer, autoplay, encrypted media, gyroscope, and picture-in-picture are all enabled. There are additional features available for you to enable, such as bluetooth, camera, and browsing topics.
Sandbox
By default, scripts are allowed, but other restrictions exist. You can disable the sandbox, which removes the restrictions to forms, modals, popups, and such.
Data
To send messages to the external document displayed in the iFrame, use the “data” property and post the contents immediately.
Target origin
Use the target origin to securely specify the required origin of the recipient window for the “data” message.
Size
You can specify the dimensions of iFrame by configuring the height and width.
Width
The default iFrame width is 400 pixels, but you can change it to suit your needs. Width is in CSS units or number of pixels.
Height
The default iFrame height is 300 pixels, but you can change it to suit your needs. Height is in CSS units or number of pixels.