Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<iframe>

iframe
align=left|center<|right|top|bottom
border=n
bordercolor=colour
class=type
frameborder=1|0
height=height
hspace=n
id=value
longdesc=url
marginheight=height
marginwidth=width
name=name
scrolling=yes|no
src=address
style=style
title=title
vspace=n
width=width
</iframe>

Defines a floating frame. This is basically a window that contains a web page.

You must enter the end-tag.

Attributes

align=left|center|right|top|bottom

Sets the alignment of the frame or of the surrounding text. The default is left.

Value…

Description…

left

The frame is drawn as a left-flush "floating frame," and text flows around it

center

Surrounding text is aligned with the centre of the frame

right

The frame is drawn as a right-flush "floating frame," and text flows around it

top

Surrounding text is aligned with the top of the frame

bottom

Surrounding text is aligned with the bottom of the frame

border=n

Specifies the size of a border (in pixels) to be drawn around the frameset.

bordercolor=colour

The colour for the border of the frameset.

class=type

Indicates the class to which the tag belongs. You can use the class attribute in a style sheet to create different styles that you want apply to a single HTML tag. For example, you might create three different styles for an <iframe> tag. See Using the class attribute as a selector for more details.

frameborder=1|0

Displays a 3-D border around the frame. 1 (default) inserts a border. 0 displays no border.

height=height

Controls the height of the floating frame. You can enter the height in pixels or as a percentage.

hspace=n

Along with vspace, specifies margins for the frame.

id=value

Specifies a unique name for the tag. No two tags can have the same id on a single page. The value must begin with a letter followed by any alphanumeric character, a hyphen, an underscore, a colon or a full stop. You use it to reference a unique style for a tag or to manipulate the tag with a script.

longdesc=url

Specifies a link to a long description of the frame. This description should supplement the short description provided using the title attribute and may be particularly useful for speech browsers.

marginheight=height

Controls the margin height for the frame, in pixels.

marginwidth=width

Controls the margin width for the frame, in pixels.

name=name

Provides a target name for the frame.

scrolling=yes|no

Creates a scrolling frame.

src=address

Displays the source file for the frame. You must always enter this attribute.

style=style

Specifies style information. See Style sheets for more information.

title=text

For information only. Some browsers display the title when you move the mouse over the tag (like a tool tip).

vspace=n

Along with hspace, specifies margins for the frame.

width=width

Controls the width of the floating frame, in pixels. You can enter the height in pixels or as a percentage.