HTML and CSS Reference
In-Depth Information
NOTE
If you don't provide a target using the <base> tag and you don't
indicate a target in a link's <a> tag, the link will load the new doc-
ument in the same frame or window as the link.
Working with Frames
Frames make it possible to split a single web “page” into multiple independent parts,
each of which can display a document on its own. When frames were originally intro-
duced, this was a much bigger deal than it is today. One of the key benefits of frames is
that they enable you to make part of a site visible all the time even while other parts can
be scrolled out of view. This can now be done using CSS positioning. Frames enable you
to load new content into one section of a layout while leaving the rest of the page in
place, but that can be accomplished using JavaScript.
That is not to say that there's no place for the use of frames any more, but they are much
less popular than they were in their heyday. There are some situations where frames are
absolutely the best solution to the problem at hand, but these days there are a lot of solid
alternatives, too.
Working with frames involves describing the frame layout and then choosing which doc-
uments will be displayed in each frame. Figure 17.7 shows how five separate documents
are needed to create the screen shown earlier in Figure 17.1.
The first HTML document you need to create is called the frameset document . In this
document, you define the layout of your frames, and the locations of the documents to be
initially loaded in each frame. The document in Figure 17.7 has three frames.
Each of the three HTML documents other than the frameset document, the ones that load
in the frames, contain normal HTML tags that define the contents of each frame. These
documents are referenced by the frameset document.
 
 
Search WWH ::




Custom Search