HTML Frames

Frames are used for displaying more than one HTML document in your browser window. No frame is connected to another, each is independent.

There are some drawbacks of using Frames:


- It becomes difficult to print the complete page

- It gets complicated to keep a track of more HTML documents


Important Tags related to Frames:


First of all it is really essential to know what tags are used for creating frames.


























Tag

 




Used for:

 




<frameset>



Defining a set of frame



<frame>



Defining an associated window



<noframes>



Defining noframes area for browsers which are unable to handle frames



<iframe>



Defining an inline associated window






What is a frameset tag?

To create frames in your browser window you need to use the frameset tag i.e. <frameset>. This frameset has a set of rows and columns. You can add as many columns and rows as you want. The space of the screen which will be occupied by the rows and columns is denoted by the values of the rows and columns.


What is a Frame tag?

A Frame tag is <frame>. It is used to describe the HTML documents which are to be put into the frames.


You can get a better idea of HTML frames by looking at the examples given below.


<frameset cols=“50%, 90%”
   <frame  src= “frame_1.htm”>
  
<frame  src= “frame_2.htm”>
</frameset>


In the example given above, there is a frameset consisting of two columns. The first one is set to 50% of the width of the browser window. The second column is set to 90% of the width of the browser window.

The first HTML document that is ‘frame_1.htm’ is placed into the first column and the second one that is ‘frame_2.htm’ is placed into the second column.



 

                    

Copyright © 2008 VisualBuilder. All rights reserved