Inline Frames

Internet Explorer included a proprietary tag designated <iframe> in the v3.0 release to place a frame within a page. This technique, called inline frames or floating frames, originally worked only with Internet Explorer. The World Wide Web Consortium (W3C) included the iframe feature in HTML 4.01. Virtually all current browsers support inline frames(iframe).

Syntax     <iframe>...</iframe>

Attribute Specifications to Adjust Appearance and Behavior

  • src="(URL of initial iframe content)"
  • name="(name of frame, required for targeting)"
  • longdesc="(link to long description)"
  • width=(frame width, % or pixels)
  • height=(frame height, % or pixels)
  • align=[ top | middle | bottom | left | right | center ] (frame alignment, pick two, use comma)
  • frameborder=[ 1 | 0 ] (frame border, default is 1)
  • marginwidth=(margin width, in pixels)
  • marginheight=(margin height, in pixels)
  • scrolling=[ yes | no | auto ] (ability to scroll)
An example is shown here:

<iframe name="inlineframe" src="float.html" frameborder="0" scrolling="auto" width="500" height="180" marginwidth="5" marginheight="5" ></iframe>

The above code produces the inline or floating frame below right which is in the righthand column of a table layout. For demo purposes, links are included to the left of the inline frame which target and change its content.


Consider "drag 'n copy" the code for the above example and paste it into a Web page and you will have an instant inline frame. Build a "float.html" file to support it and you have content. All files must reside in the same directory/folder.

That's pretty much it in a nutshell. Less challenging than frames and W3C included it in HTML 4.01 and higher. Browser compatibility includes all current browsers(2007) and offers developers another web page design option.
Thanks for stopping by!