ASP Net Center.com
HTML Basics
Introduction
Hyperlink
Image Display
Tables
Frames
Forms
Formats

Frames

With frames, you can display more than one HTML document in the same browser window. The main advantage of a frame is to maintain some information on the page while browsing other documents. Some old browsers do not support frames.

The tags to create frames are; frameset and frame. FRAMESET defines how to set the browser into frames using a set of rows or columns. The value of the row or the column is the amount of screen that row or column will accupy. FRAME defines the document to display on the frame. Here is a frame example that divides the browser in to two equal columns:
<html>
<frameset cols="50%,50%">
 <frame src="file.htm">
 <frame src="file2.htm">
</frameset>
</html>

Copy and paste this code into new file. Change the files name to existed files in your folder and view the result on a browser or here to view.
Here is an example of a frame that divides the browser into two rows:
<html>
<frameset rows="50%,50%">
 <frame src="file.htm">
 <frame src="file2.htm">
</frameset>
</html>

Copy and paste this code into new file. Change the files name to existed files in your folder and view the result on a browser or here to view.
Here is an example of a frame that sets the browser into one row and two columns:
<html>
<frameset rows="30,70" scroll="no" border="1" marginheight="0" >
 <frame noresize="true" src="file.htm">
<frameset cols="25%,75%">
 <frame noresize="true" src="file2.htm" name="file2" >
 <frame noresize="true" src="file3.htm" name="file3" >
</frameset>
</frameset>
</html>

With Noresize, the frame cannot be resized on the browser. You can choose to display the scroll bar by setting it to yes or no. Margin measures the amount of space between the browser edge and the page content. You can also set a border.
In order to display documents on the right frame [file3.html]. Link file [file2.html] must have target. There are two ways to do it. The easier one is to type <base target="file3"> in the head section of the document. The second way is to set the target of each link like this: <a href ="link.htm" target ="file3">.
 Click here to view the result of this example assuming file2 and file3 are created.
Here are example of how file2 [the list file] would look like:
<html>
<head>
<title> file2 </title>
</head>
<body>
<a href ="http://www.yahoo.com" target ="file3">yahoo</a><br>
<a href ="http://www.hotmail.com" target ="file3">hotmail</a><br>
<a href ="link2.htm" target ="file3">link two</a>
</body>
</html>

<html>
<head>
<title> file2 </title>
<base target="file3">
</head>
<body>
<a href ="http://www.hotmail.com">hotmail</a><br>
<a href ="http://www.yahoo.com">yahoo</a><br>
<a href ="link2.htm">link two</a>
</body>
</html>

Tables Forms