HTML Frames


Frames are the slices that you divide a web page into and then upload the different sections into it. It makes your HTML page, pretty easy to build up as all you have to do is put your different page sections into different web pages and at the end of it, just mention the various pages in your HTML page.

 

Frames are specified using the frameset tag and as with all HTML tags, this too has an opening tag and a closing tag.

 

Here is how it goes in code:

 

<html>

<head>

</head>

<frameset>

<frame src="MainPage.html">

<frame src="SecongPage.html">

</frameset>

</html>

 

The Frame src indicates the location of the page which needs to be used as the input here.

 

You can add a lot of other attributes to your frame tag such as the space it will occupy, borders and so on. Here is a list of attributes that can be specified with the frameset tag at the opening tag:

 

§         Rows – Specifies row space

§         Cols -  Specifies Column space

§         Frameset border – Specifies border

§         Frameset frameborder  - Specifies a window border

§         Frameset framespacing – Specifies the border width used by internet explorer.

§         Scrolling – Allows for a scroll

§         Noresize – Does not allow for resizing

 

Here is how it goes in code:

 

<html>

<head>

</head>

<frameset border="1" frameborder="0" framespacing="0" rows="20%,*">

<frame src="MainPage.html"> scrolling="yes" noresize

<frameset border="1" frameborder="0" framespacing="0" cols="30%,*">

<frame src="SecongPage.html"> scrolling="no"

</frameset>

</html>