Документация
HTML CSS PHP PERL другое
Wonderful Inline Frames
 
Previous Page
Table of Contents
Next Page

Wonderful Inline Frames

Originally introduced by Internet Explorer 3.0, iframes, inline or floating Netscape 6.0+ does have inline frame support.

Iframes work a bit differently from standard frames. First, you don't create a separate frameset for the frame. You place the iframe information directly inline in any regular page.

regularly. This means that the main HTML page never gets touchedjust the remote page does.

NOTE

You aren't limited to just HTML pages. You can link to any kind of source in an iframe, including images and multimedia objects.


Inline frames can be placed anywhere on a page. Unlike standard frames, they do not require a frameset. As with standard frames, iframes do require an additional pagein this case text.html, to work (see Example 6-14).

Example 6-14. Inline frames
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Inline Frames</title>
</head>

<body>
<iframe width="350" height="200" src="text.html" scrolling="auto" frameborder="1">
</iframe>

</body>
</html>

The browser will draw the iframe to your specifications. Here, I've got it set to a width of 350 pixels and a height of 200 pixels, with automatic scrolling and a frame border of 1 to help you visualize the results.

NOTE

I like to think of iframes a lot like images or objects. They really do work in a very similar way: The browser draws the area and then inserts the objectin this case, another HTML fileinto the drawn area.


Figure 6-10 shows the results.

Figure 6-10. iframe in Mozilla.


NOTE

such as noframes for iframes, either. So, although their use is often very convenient, you'll want to limit it to instances in which you do not have to support older web browsers.


    Previous Page
    Table of Contents
    Next Page


     Приглашаем посетить сайты 
    Мода Чехов Крылов Автомобили Горький Грибоедов Хлебников Ходасевич Лесков CSS