Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
13.10 Serving Dynamic Content with Inline Frames^521

The code for the inline frame used to create this effect is as follows:
<iframe src="trillium.html" title="Trillium Wild Flower"
height="160" name="flower" width="350">
Description of the lovely Spring wild flower, the
<a href="trillium.html" target="_blank">Trillium</a></iframe>
As shown, an inline frame is created using the <iframe>element. The <iframe>element
is a container tag. It is always used with its closing </iframe>tag. Any content that
should be displayed if the browser does not support inline frames (such as a text descrip-
tion or link to the actual page) should be placed between the tags. The <iframe>tag con-
figures an area on a Web page that can be used to display a different Web page document.
This inline area is 150 pixels high and 300 pixels wide by default. The height and width
attributes can be used to configure the exact dimensions. In the example code, the align
attribute was used to align the inline frame to the right of the text on the Web page. The
nameattribute was used so that the inline frame could be targeted by links. Table 13.2
lists attributes for <iframe>tags. Commonly used attributes are shown in bold.

Table 13.2