References

Collection of references for web development.

HTML iframe tag

Description

The HTML <iframe> element represents an inline frame, which embeds another HTML document into the current document.

Attributes

Attribute Value Description
allowfullscreen boolean Specifies whether the iframe is allowed to be in fullscreen mode or not.
height number Specifies the height of the element, default is measured in pixels.
name string Specifies the name of the element.
sandbox allow-forms
allow-modals
allow-orientation-lock
allow-pointer-lock
allow-popups
allow-popups-to-escape-sandbox
allow-presentation
allow-same-origin
allow-scripts
allow-top-navigation
allow-top-navigation-by-user-activation
Specifies an extra set of restrictions for the iframe.
src URL The URL of the file to embed in the document.
srcdoc code Specifies the HTML content to show in the iframe.
width number Specifies the width of the element, default is measured in pixels.

Example

<iframe src="https://codeshack.io/" width="300" height="300"></iframe>