The iframe element introduces a new nested browsing context.


<iframe attribute-name="attribute-value"></iframe>
Name Value Description
height non-negative integer Height of the canvas in CSS pixels
name browsing-context name Valid browsing context name
sandbox sandbox allow list Instructs the UA to enable a set of extra restrictions on any content hosted by the iframe - HTML5
seamless seamless | empty Instructs the UA that the iframe element's browsing context is to be rendered in a manner that makes it appear to be part of the containing document (seamlessly included in the parent document) - HTML5
src URI URL for the audio stream
srcdoc iframe srcdoc Content of the page that the nested browsing context is to contain - HTML5
width non-negative integer Width of the canvas in CSS pixels



iframe {
  border: 2px inset;

Example | height

Example | name

Example | sandbox

Example | seamless

Example | src

Example | srcdoc

Example | width

Example | CSS


W3C HTML 4.01 Specification


W3C HTML 5.1