This is an Internet Explorer specific element that departs from the
standard FRAME structure syntax. This IN-LINE framing method
(also called "floating frames") is basically a method to embed
other HTML documents within the framework of a regular HTML document
structure with the level of placement control allowed by the IMG element. In
implementation and display it is created and treated much like the OBJECT
element is - backwards compatibility is achieved by having the contents of the
element ignored by browsers that understand IFRAME.
Description:
This specifies the alignment of text following the FRAME reference
relative to the FRAME on the screen. LEFT and RIGHT alignment specify
floating horizontal alignment of the frame in the browser window, and
subsequent text in the document will wrap around the frame. The other
values specify vertical alignment of text relative to the frame on
the same line.
Values:Left | Right |
Top | Middle |
Bottom
FrameBorder
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute gives the author the option of whether or not to have
a border around the frame.
Values: 1 [display border -
DEFAULT] 0 [display no border]
Height
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute explicitly specifies the height of the frame in pixels.
It can be used to speed up display of the document being downloaded so
it can pre-render the document without the frame while the frame
downloads.
Values: Positive integers
HSpace
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute specifies the horizontal spacing around the frame in pixels
(left and right padding.)
Values: Positive integers.
Longdesc
2 | 3
| 3.2 | 4
| IE | M
| N | O
Required? No
Description:
This attribute specifies the URL of a longer description of the contents
of the IFRAME specified in the SRC attribute. This would allow long
passages of descriptive narrative with markup for the content of the IFRAME.
Values: Either an absolute or relative URL.
MarginHeight
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute specifies the horizontal spacing INSIDE the frame in pixels
(left and right padding.)
Values: Positive integers.
MarginWidth
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute specifies the vertical spacing INSIDE the frame in pixels
(top and bottom padding.)
Values: Positive integers.
Name
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
The optional Name attribute indicates the symbolic name assigned to
the current frame for reference by the browser when other links target
the frame as a destination. Default behavior for all FRAME documents
is to be unnamed. Named frames can serve as a destination of links via the
TARGET attribute within the
A, AREA,
BASE, and FORM tags.
Values: Alphanumeric characters.
Scrolling
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute provides guidelines for displaying a scrollbar in the
frame for the user.
Values: Auto [DEFAULT
- Let the browser decide if a scrollbar is necessary.] Yes [always provide a
scrollbar] No [never provide scrollbar]
Src
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? Yes
Description:
This attribute represents the URL of the current frame document. An
IFRAME tag with no SRC attribute will display a blank space where
the iframe would be.
Values: Either an absolute or relative URL.
VSpace
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute specifies the vertical spacing around the frame in pixels
(top and bottom padding.)
Values: Positive integers.
Width
2 | 3
| 3.2 | 4
| IE3B2 | M
| N | O
Required? No
Description:
This attribute explicitly specifies the width of the frame in pixels.
It can be used to speed up display of the document being downloaded
so it can pre-render the document without the frame while the frame
downloads.
Values: Positive integers
Example
<html>
<head>
<title>Floating frames
example</title>
</head>
<body>
<h1>This
is a floating frame example</h1>
<hr>
<iframeSRC="http://www.foo.com/frame1.html"
NAME="float1" WIDTH="100"
HEIGHT="100"
ALIGN="right">
You will not see this text if your browser supports
IFRAME. If you CAN see this, you are in a bad way.
</iframe>
<hr>
</body>
</html>
Use of frames of any type can involve a costly amount of extra
downloads that a user could quickly tire of.
Even though this element is a great concept, Internet Explorer is the only
browser that supports this element. The percentage of people who can view
pages with floating frame capability is still quite low.
DTD NOTE: There seems to be a LOT
of confusion about what attributes this element accepts. Microsoft's IE3
DTD as well its online HTML reference both list several attributes which
would apply more fittingly with the FRAME element. Indeed, they do not
work with the IFRAME element at all under direct experimentation.
DTD NOTE: The Microsoft Internet
Explorer 3.0 DTD lists IFRAME as a replaced element (like the IMG
element) but its online HTML reference lists it as a container element. Under
direct experimentation it appears to be a container so I am treating
it behaviorally like the other major Multimedia container element,
OBJECT. Like OBJECT, content of the IFRAME element is only used to
allow for backward compatibility.
There appears to be different default interior padding values controlled
by the MARGINHEIGHT and MARGINWIDTH attributes. In other words, if only
one of these attributes is specified, the default for the unspecified
attribute will be different than the default for the attribute if
BOTH attributes are specified. [That looks confusing even
to ME =)] It is possible (though unverified) that in instances
where only one value is present it is used as the margin value for
BOTH dimensions.
Browser Peculiarities
Internet Explorer briefly flirted with a syntax for floating frames
using extensions to the FRAME element. This was changed to the IFRAME element
in 3.0 Beta 2 to allow for backward compatibility for non-supporting
browsers. When the old syntax is encountered in versions 3.0 Beta 2 and
greater, Internet Explorer gives a warning message that the syntax has
changed.
There is an attribute that Microsoft's references list for this
element called BORDER. It does appear to have some effect, but it appears
to be to render padding around the frame (which is what the HSPACE and
VSPACE attributes accomplish) instead of rendering a distinct border
around the frame.