HTML and CSS Reference
In-Depth Information
What Are Frames?
In this lesson, you'll learn about the tags that you can use to create frames. There are two
ways to use frames. The first is to divide the page into sections using a frameset and then
to load documents into each of the frames, and the second is to embed a second docu-
ment into an existing page using an inline frame. Inline frames are like images or Flash
movies, they can be included anywhere within a page. Over time, inline frames have
become more commonly used, and frames created using framesets have become less
commonly used. HTML5 does not include support for frames created using framesets,
leaving only inline frames. Browser support for framesets is still all but universal, but for
new projects, you should probably avoid using framesets whenever possible.
Frames give you an entirely different level of layout control than you've had so far in this
book. For example, take a look at the example in Figure 17.1.
A sample web
page with frames.
On this screen, you see four frames displayed within one browser window. The left
frame contains graphical navigation elements, the lower-right frame contains text naviga-
tional links, the upper-right frame contains the page header, and the middle-right frame
contains the main content of the site. This screenshot also illustrates one of the disadvan-
tages of using frames. The frame that contains the actual page content actually uses a
fairly small section of the browser window; the rest of the window is consumed by the
other frames. When you separate your layout using frames, you can detract from the
important content on your site.
Search WWH ::

Custom Search