The iFrame is a variation of the HTML Frame tag but, unlike HTML Frames, iFrames continue to be in wide use.

iFrame is short for Inline Frame. Like HTML frames, iFrames are used to embed another document within the current HTML document.

The tags for iFrames are very simple:

<iframe src="http://www.colum.edu/" width="850px" height="475px" scrolling="no"> </iframe>

Web page:

Just as with sounds and images, there are ethical issues involved when you embed other people's Web content into your site. Some sites, such as Google, block you from framing their content on your site (which is a bit ironic since Google's business is based on displaying other people's content on their pages).

iFrame attributes:

  • src - URL of content to put in frame
  • height - pixels / %
  • width - pixels / %
  • frameborder - pixels
  • marginwidth - pixels
  • marginheight - pixels
  • scrolling - yes / no / auto
  • id/class/style - for applying CSS

iFrames are frequently used to incorporate content from the Web sites of partners or collaborators into your pages. In this example, a weather widget was created on weather.com and inserted into this page in an invisible iFrame.

<iframe src="http:// wow.weather.com/weather/wow/rebuildmodule/USIL0225? config=SZ=300x250*WX=HC*LNK=SSNL*UNT=F*BGC=5574b9 *MAP=CSC%7Cnull*DN=re-vision.com*TIER=0*PID= 1306618492*MD5=c998490ea2d3ce116d898f5e518a52e4& proto=https:&target=wx_module_7043" width="300" height="250" marginwidth="0" marginheight="0" scrolling="no" frameborder="0"></iframe>
Web page:
Previous | Webwork Table of Contents | Next >