Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









TAG:  iframe

<iframe> ... </iframe>

The <iframe> tag is used to insert an inline frame into the body of an HTML document. This is a very convenient method for inserting an HTML page inside another HTML page. Unlike the frameset, frame, and noframes tags, the iframe tag can only be used inside a body element. You must not place the iframe tag inside a frameset element.
 
An iframe element displays content, including forms, images, multimedia, other frames, tables, etc. It is very important to understand that the only way to assign content to an iframe is to assign a URL using the src attribute. Whatever content is displayable at the referenced URL will in turn be displayed inside the iframe.
 
You can place a default textual message between the opening and closing iframes tags. This will only display if the browser does not recognize inline frames.
 
The closing tag is mandatory.
 
Attributes and Events
 
class    dir    id    lang    onclick    ondblclick    onkeydown    onkeypress    onkeyup    onmousedown    onmousemove    onmouseout    onmouseover    onmouseup    style    title

align
The align attribute is used to place the frame inline with adjacent text. The values bottom, middle, and top align the frame with the bottom, middle, and top of the text. The values right and left place the text on the right or left boundary and allow any text to flow around the frame.
 
frameborder
The frameborder attribute is used to add or remove a border around the frame. The values of yes or 1 allow a border. The values of no or 0 forbid a border.
 
height
The height attribute sets the vertical extent of the iframe in either pixels or as a percentage of the overall screen height.
 
longdesc
The longdesc attribute is the URL address of an HTML document that contains a long textual description of the frame. This is designed to provide more information than a title element would display.
 
marginheight
The marginheight attribute is used to set the amount of white space in pixels that will appear along the top and bottom margins between the frame border and the contents. If you provide an unrealistic value, the browser will simply ignore this attribute.
 
marginwidth
The marginwidth attribute is used to set the amount of white space in pixels that will appear along the left and right margins between the frame border and the contents. If you provide an unrealistic value, the browser will simply ignore this attribute.
 
name
The name attribute is a string of characters that is used to label a frame with a name. The name must be unique to that document and cannot be reused.
 
scrolling
The scrolling attribute is used to determine if horizontal and vertical scrolling bars will appear in the iframe. If the content is larger than the frame, this permits scrolling up and down or left and right, as needed, to see the entire contents. There are three permitted values: yes which always displays scroll bars; no which never displays scroll bars; and auto which displays scroll bars only when needed. If a value is not provided, the default is auto.
 
src
The src attribute provides the URL address of any valid HTML, ASP, or other displayable page. The contents of the referenced URL will be displayed inside the frame.
 
width
The width attribute sets the horizontal extent of the iframe in either pixels or as a percentage of the overall screen width.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>DevGuru XHTML select Tag Example</title>
</head>
<body>
Gold Fish Types
<br />
<iframe width="50%" height="77" src="html_frames_yellow_two.html" frameborder="yes" scrolling="yes">
Sorry, you need inline frames to fully see this page.
</iframe>

</body>
</html>


Output:


 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information