Chapter 11. Frames

11.2. Frame Tags
<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”>
<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>

112

11.3.2. Nesting <frameset> Tags
<html>
<frameset cols=”50%,*”>
<frameset rows=”50%,*”>
<frame src=”frame1.html”>
<frame src=”frame2.html”>
</frameset>
<frameset rows =”33%,33%,*”>
<frame src=”frame3.html”>
<frame src=”frame4.html”>
<frame src=”frame5.html”>
</frameset>
</frameset>
</html>

1132

11.7.1. The target Attribute for the <a> Tag
<html>
<frameset cols=”150,*”>
<frame src=”toc.html”>
<frame src=”pref.html” id=”view_frame”>
</frameset>
</html>

Toc.html
<html>
<body>
<h3>Table of Contents</h3>
<ul>
<li><a href=”pref.html” target=”view_window”>Preface</a>
<li><a href=”chap1.html” target=”view_window”>Chapter 1</a>
<li><a href=”chap2.html” target=”view_window”>Chapter 2</a>
<li><a href=”chap3.html” target=”view_window”>Chapter 3</a>
</ul>
</body>
</html>

1171

Pref.html
<html>
<body>
The first time the user selects one of the table of
contents hypertext links, the browser will open a new window,
label it “view_window,” and display the desired document’s
contents inside it. If the user selects another link from the table of
contents and the “view_window” is still open, the browser will again
load the selected document into that window, replacing the previous document.
</body>
</html>
pref <html>
<body>
The first time the user selects one of the table of
contents hypertext links, the browser will open a new window,
label it “view_window,” and display the desired document’s
contents inside it. If the user selects another link from the table of
contents and the “view_window” is still open, the browser will again
load the selected document into that window, replacing the previous document.
</body>
</html>

toc


11.7.3. The <base> Default Target

<html>
<head>
<title>Table of Contents</title></head>
</nody>
<base target=”view_frame”>
</head>
<body>
<h3>Table of Contents</h3>
<ul>
<li><a href=”pref.html”>Preface</a></li>
<li><a href=”chap1.html”>Chapter 1</a></li>
<li><a href=”chap2.html” >Chapter 2</a></li>
<li><a href=”chap3.html”>Chapter 3</a></li>
</ul>
</body>
</body>
</html>

1173