iframe

4:14:00 PM |


Example Code
<iframe width="560" height="315" src="#" frameborder="0" allowfullscreen></iframe>
Good (and terrible) uses for <iframe>
There are some legitimate uses for <iframe>, Here are a few:
  • embedding third-party media
  • embedding your own media in a document-agnostic way
  • embedding code examples (we do it on this site)
  • embedding third party "applets" like payment forms
Browser Support for iframe
AllAllAllAllAllAll
Attributes of iframe
sandbox
Places a set of security and usability restrictions on the iframe.
scrolling
Was used to toggle scrolling on iframes. Deprecated in HTML5. Use CSS instead.
name
Specifies the name of an iframe.
align
Was used to set the alignment of an inline frame relative to surrounding elements. Deprecated. Use CSS instead.
frameborder
Was used to toggle the display of a border around an iframe. Deprecated in HTML5. Use CSS instead.
longdesc
Was used to specify URL containing a long description of an iframe. Deprecated in HTML5. Use CSS instead.
marginwidth
Was used to control the width of margins around an iframe. Deprecated in HTML5. Use CSS instead.
src
Specifies the URL of a document to display in an iframe.
vspace
Was used to control the vertical spacing around an iframe. Deprecated in HTML5. Use CSS instead.
width
Specifies the width of an iframe.