![]() |
|
Floating frames enable you to open a frame within a page. You can insert a floating frame in the same way in which you can insert an picture on an HTML page. You can specify the size of the frame and its border, and you can align it with other text and pictures on the page. You use the <iframe> tag to set up floating frames. The following example aligns a frame at the left margin and wraps subsequent text around the right side of the frame: <iframe src="xx.htm" align="left"> </iframe> Here's some text to the right of a frame. <br clear="left">Here's some text beneath the frame. This displays as:
This doesn’t seem much different to having a table in the flow of text except that the a floating frame loads the content from another html page (xx.htm in our example). You might use it to display the same content on many pages, a disclaimer for example. The <iframe> syntax might not be compatible with all browsers. In that case, you can use a <frame> tag within the <iframe> tags to provide an alternative presentation. For example: <iframe src="xx.htm" align="left"><frame src="xx.htm"> <iframe> In the previous example, the text of xx.htm will display in a floating frame in either an <iframe> or non-<iframe>-compatible browser. Remember that you set the attributes of <iframe> and <frame> independently. For example, if you want to specify position or size, you include those attributes in both the <iframe> tag and the <frame> tag. Floating frames are new in the HTML 4.0 specification. |
More information Displaying documents in a specific frame Setting up floating frames |