HTML TUTORIAL

HTML Frames

Frames are used to display more than one HTML document in the same window. These html documents stay in rectangular areas called frames. Using frames you can keep one part of the page stationary while other parts move.

With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.

The Frameset and Frame Tags

The rectangular Frames are created using two tags - Frameset Taga dn the Frame Tag.

Let us look at the following example.
<frameset cols="30%,70%">
   <frame src="col1_frame.html">
   <frame src="col2_frame.html">
</frameset>


The frameset tag defines "how" to divide the page into frames. In the above code it divides the page into two columns of width 30% and 70% respectively.

The frame tag will define which html page will go into the frames created by the frameset tag. The page col1_frame.html will go into the first column that has width of 30%. The page col2_frame.html will go into the second column of width 70%.

The noresize attribute

By default the frames have borders that can be dragged by and resized. We can prevent this by adding noresize ="noresize" to the frame tag.

Practice Examples

You will like to practice more about links here.

Example - Vertical Frames

Example - Horizontal Frames

Example - Mixed Frame

Example - Frame with noresize attribute

Example - Frame with Navigation

Example - An iframe Example