HTML iframe - how to use <iframe> tag

The HTML <iframe> tag is used to define an inline frame with content obtained from a different page.

Attributes

The iframe tag supports the global and event attributes.

height
Defines the height of the iframe
name
Defines the name of the iframe
sandbox
Defines extra restrictions for the content defined within the iframe
src
Defines the web address that will be loaded in the iframe
srcdoc
Defines HTML content that can be served within the iframe. If the browser supports srcdoc attribute, the iframe will display content from the srcdoc attribute, otherwise, the iframe will display content from the src attribute.
width
Defines the width of the iframe

Examples:

<iframe src="file/file.html" height="200" width="400" frameborder="0" name="if1"></iframe>

More information

Check out the iframe tutorial for more information.