Skip to Main Content
HTML & XHTML: The Definitive Guide, 6th Edition
book

HTML & XHTML: The Definitive Guide, 6th Edition

by Chuck Musciano, Bill Kennedy
October 2006
Intermediate to advanced content levelIntermediate to advanced
680 pages
21h 44m
English
O'Reilly Media, Inc.
Content preview from HTML & XHTML: The Definitive Guide, 6th Edition

Frame Tags

You need to know only two tags in order to create a frame document: <frameset> and <frame>. In addition, the HTML 4 and XHTML standards provide the <iframe> tag, which you may use to create inline, or floating, frames, and the <noframes> tag to handle browsers that cannot handle frames.

A frameset is simply the collection of frames that make up the browser's window. Column- and row-definition attributes for the <frameset> tag let you define the number of and initial sizes for the columns and rows of frames. The <frame> tag defines which document—HTML or otherwise—initially goes into the frame within those framesets and is where you may give the frame a name to use for document hyperlinks.

Here is the HTML source we used to generate Figure 11-1:

<html>
<head>
<title>Frames Layout</title>
</head>
<frameset rows="60%,*" cols="65%,20%,*">
  <frame src="frame1.html">
  <frame src="frame2.html">
  <frame src="frame3.html" name="fill_me">
  <frame scrolling=yes src="frame4.html">
  <frame src="frame5.html">
  <frame src="frame6.html" id="test">
  <noframes>
    Sorry, this document can be viewed only with a
    frames-capable browser.
    <a href = "frame1.html">Take this link</a>
    to the first HTML document in the set.
  </noframes>
</frameset>
</html>
A simple six-panel frame layout

Figure 11-1. A simple six-panel frame layout

Notice a few things in the simple frame example and its rendered image (Figure 11-1). First, like tables, the browser ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CSS Master, 3rd Edition

CSS Master, 3rd Edition

Tiffany B Brown

Publisher Resources

ISBN: 0596527322Errata Page