W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n

<IFRAME>...</IFRAME>

Description

<Related pages>
* How do I load a page in another frame?
This element is a container to create an inline or floating frame. A floating frame is a frame in which the contents of another HTML document can be seen. The difference with a normal frame is that the floating frame can be seen inside a document and is treated as a part of the document. This means that when you scroll through the page the frame will scroll with it.

Browsers that support this element will ignore all HTML inside the container. Other browsers will not, so you can give an alternative for the floating frame to browsers that do not support it.

DTD

<!ELEMENT IFRAME - - (%flow;)*         -- inline subwindow -->
<!ATTLIST IFRAME
  %coreattrs;                          -- id, class, style, title --
  longdesc    %URI;          #IMPLIED  -- link to long description
                                          (complements title) --
  name        CDATA          #IMPLIED  -- name of frame for targetting --
  src         %URI;          #IMPLIED  -- source of frame content --
  frameborder (1|0)          1         -- request frame borders? --
  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
  height      %Length;       #IMPLIED  -- frame height --
  width       %Length;       #IMPLIED  -- frame width --
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title

W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
FRAMEBORDER
Provides the option to display or not display a border for a frame. A value of 0 displays no border. A value greater than 1 will display a border, but the value has no influence of the width of the border.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
HEIGHT
Specify the height of the frame to the browser. You can specify the height as a number of pixels or as a percentage of the current screen height.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2n
2.1n
LONGDESC
With this attribute you can supply the URI of a document that contains a long description of the frame. This attribute supplements the TITLE attribute, which holds the title of the frame.

This attribute can be useful for non-visual browsers.


W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
MARGINHEIGHT
This attribute is used to control the vertical margins for the frame. If specified, the value for MARGINHEIGHT is in pixels. Margins can not be less than one-so that frame objects will not touch frame edges-and can not be specified so that there is no space for the document contents. The MARGINHEIGHT attribute is optional; by default, all frames default to letting the browser decide on an appropriate margin width.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
MARGINWIDTH
This attribute is used to control the horizontal margins for the frame. If specified, the value for MARGINWIDTH is in pixels. Margins can not be less than one-so that frame objects will not touch frame edges-and can not be specified so that there is no space for the document contents. The MARGINWIDTH attribute is optional; by default, all frames default to letting the browser decide on an appropriate margin width.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
NAME
The NAME attribute is used to assign a name to a frame so it can be targeted by links in other documents (These are usually from other frames in the same document). The NAME attribute is optional; by default all windows are unnamed. Names must begin with an alphanumeric character. All other window names will be ignored.

Named frames can have their window contents targeted with the TARGET attribute of the A element


W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
SCROLLING
The SCROLLING attribute is used to describe if the frame should have a scrollbar or not.

Value Description
YES Yes results in scrollbars always being visible on the frame.
NO No results in scrollbars never being visible.
AUTO Auto instructs the browser to decide whether scrollbars are needed, and place them where necessary.
The SCROLLING attribute is optional; the default value is auto.


W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
SRC
The SRC attribute takes as its value the URL of the document to be displayed in this particular frame.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
WiDTH
Specify the height of the frame to the browser. You can specify the height as a number of pixels or as a percentage of the current screen height.

Examples

Source
Lets create a page with several sites inside it :
<TABLE width="100%">
<TR><TD>www.microsoft.com</TD></TR>
<TR><TD>
<IFRAME src="http://www.microsoft.com"
width="100%" height="200" frameborder="0">
I'm sorry but your browser doesn't support the IFRAME element.
</IFRAME></TD></TR>
<TR><TD>www.netscape.com</TD></TR>
<TR><TD>
<IFRAME src="http://www.netscape.com"
width="100%" height="200" frameborder="0">
I'm sorry but your browser doesn't support the IFRAME element.
</IFRAME></TD></TR>
</TABLE>
 
Result
Lets create a page with several sites inside it :
www.microsoft.com
www.netscape.com
Statistics