<frameset> tag
rows: gives the number of rows each frame will
have.cols: gives the width of each frame.<frame> tag
<frameset>.name: identifies the specific frame.src: gives the URL of the page to be displayed.target attribute of the <a> tag:
says which frame the page will be loaded
into.target:
target="_blank": loads the page in a new blank
browser window.target="_self": loads the page into the same
window as the anchor element.target="_parent": loads it in the parent
<frameset> tag (the one that encapsulates
the current frame).target="_top": loads the page into the full
window.<noframes> element for
browsers that do not support frames to validate with the
<noframes> tag, you need to use the
<body> tag within.<frameset> tags (lets you put frames
within frames).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>A Simple Frames Example</title>
</head>
<frameset cols="40%,*">
<frame src="http://www.math.ucla.edu" name="math" />
<frame src="http://www.math.ucla.edu/~ccli/index.html" name="prof" />
<noframes>
<body>
<p>
Sorry, this document can be viewed only with a frames-capable browser.
Click on <a href="http://www.math.ucla.edu">Math Web Page</a> to be
taken to the first page in the series.
</p>
</body>
</noframes>
</frameset>
</html>
|
frameset line to
(1) <frameset cols="200,*">
(2) <frameset rows="40%,*">
<frameset cols="40%,20%,40%"> <frame src="http://www.math.ucla.edu" name="math" /> <frame src="http://www.math.ucla.edu/~ccli/index.html" name="prof" /> <frame src="http://www.yahoo.com" name="yahoo" /> |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Frames Example 3</title>
</head>
<frameset cols="200,*">
<frame src="http://www.math.ucla.edu/~ccli" name="prof">
<frameset rows="60%,*">
<frame src="http://www.math.ucla.edu" name="math">
<frame src="http://www.google.com" name="google">
</frameset>
</frameset>
<body>
<p>
Sorry, this document can be viewed only with a frames-capable browser.
</p>
</body>
</noframes>
</frameset>
</html>
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Example 4</title>
</head>
<frameset cols="200,*">
<frame src="menu.html" name="menu">
<frame src="http://www.google.com" name="search">
</frameset>
<body>
<p>
Sorry, this document can be viewed only with a frames-capable browser.
</p>
</body>
</noframes>
</frameset>
</html>
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Search Engines</title>
</head>
<body>
<h3>Search Engines</h3>
<ul>
<li><a href="http://www.google.com" target="search"> Google</a></li>
<li><a href="http://search.yahoo.com" target="search"> Yahoo</a></li>
<li><a href="http://search.msn.com" target="search">MSN</a></li>
</ul>
</body>
</html>
|