In one page we can have more than one window by using frameset. For this, there is <frameset> tag that defines the frame set in a document. At first, let's learn its logic.
When you visit a WEB site, you always see that there is top section that consists of company logo, motto and so ever. On the left side, there is a menu, on the left side there is a content and on the bottom there is some links and copy right section. As you see, when we link on menu, just content part is changed, other parts are same. So why do we have more than one menu or top section? Think that you have a WEB site consists of 10 pages and it means you have 10 same menu. What are you going to do if you want to add one more link into your menu? You have to change 10 page for it. But by using frame you can design a menu separately and integrate it into our all pages. What is why people prefer to use frames.
So let's do it as an example.
As we see before at table document, frames work with the same logic. If you look at above paragraph you can image a table like this.
Draw table.
So we have 3 rows and 2 columns. And we need to merge first row cells and last row cells but we don’t have merge option in a frames. Thus we need to use more than one frame set. To define frame set, we need to use <frameset> tag.
<frameset>
</frameset>
As I said, we don’t have merge feature for frames so we have to define more than one frame to do this example. At first we start with the rows(from left-top to right-bottom). To be able to define rows and columns we need to use cols="" attribute for column numbers and size, rows="" attribute for rows numbers and attributes. What it means by numbers and size? For example, we need to define frameset with 3 rows and lets say that first row height is 100, second row is undefined, and the last one is 50. So rows="100,*,50". As you see we define rows with their size. There is 3 size and it means there is 3 rows with these sizes.
<frameset rows="100,*,50">
</frameset>
Now we need these frame pages. To be able to do that we need to use <frame> tag which defines the frame page and need to use src="" attributes the define frame page location. I suppose that you have pages top.HTML which consists of logo and motto, and bottom.HTML which consists of some links and copy right sentence. For now I skipped the menu.HTML and content.HTML part.
<frameset rows="100,*,50">
<frame src="top.HTML">
...
<frame src="bottom.HTML">
</frameset>
Now we need to define a frameset with 2 columns for menu and content. Now there is 2 columns frameset so we need to use cols="" attribute and define the frame pages.
<frameset rows="100,*,50">
<frame src="top.HTML">
<frameset cols="100,*">
<frame src="menu.HTML">
<frame src="content.HTML">
</frameset>
<frame src="bottom.HTML">
</frameset>
The point is when you use rows="" attribute, you define the height of the frames, if you use the cols="" attribute you define the width of the frames.
Now how are we going to do that when user click on menu link, content page will change?
To be able to do this, at first we need to name the content frame by using name="" attribute. <frame src="content.HTML" name="content">
Now open your menu.HTML page. We have some link in menu.HTML and we need to define the target as a content frame like that <a href="products.HTML" target="content"> Products</a>. Now when user clicks on the products link, products.HTML page will open inside the content frame. It is so easy.






