HTML and CSS Reference
In-Depth Information
Inline Frames
The main advantage of inline frames is that is that you can position them anywhere on a
web page, just as you can other elements like images or Flash movies. You can incorpo-
rate content from another page or even another site into a page in a seamless way
through the use of inline frames. Inline frames, which are specified using the <iframe>
tag, are commonly the means by which “widgets” offered by popular websites are incor-
porated into other websites. For example, sites like Twitter and Facebook offer widgets
that you can incorporate into your own site that are implemented using inline frames.
Here's a brief run-through of how to create floating frames. First, you define them using
the <iframe> tag. Like images, these frames appear inline in the middle of the body of
an HTML document (hence the i for inline). The <iframe> tag supports attributes like
src , which contains the URL of the document to be displayed in the frame, and height
and width , which control the size of the frame.
17
Table 17.3 lists the attributes of the <iframe> element.
TABLE 17.3
Key Attributes
Attribute
Description
Specifies the width, in pixels, of the floating frame that will hold the
HTML document.
width
Specifies the height, in pixels, of the floating frame that will hold the
HTML document.
height
Specifies the URL of the HTML document to be displayed in the frame.
src
Specifies the name of the frame for the purpose of linking and
targeting.
name
Indicates whether the frame should display a border. A value of 1
indicates the presence of a border, and a value of 0 indicates no
border should be displayed.
frameborder
Specifies the margin size for the left and right sides of the frame in
pixels.
marginwidth
Specifies the size of the top and bottom margins in pixels.
marginheight
Indicates that the frame should not be resizable by the user (Internet
Explorer extension).
noresize
As with the <frame> tag, indicates whether the inline frame should
include scrollbars. (This attribute can take the values yes , no , or auto ;
the default is auto .)
scrolling
Specifies the height of the margin (Internet Explorer extension).
vspace
Specifies the width of the margin (Internet Explorer extension).
hspace
 
 
 
Search WWH ::




Custom Search