Working with Frames in HTML


0

You can divide the browser window into frames (two partitions). You can create any number of frames as per your needs. A frame is created by using <FRAMESET> tag.

A minimum of two html files are needed to create a web page with Frames. Path to html files are specified using <FRAME> tags src attribute.

Try out the example given below:

<FRAMESET rows = "10%,*"><FRAME src = "first.html">

<FRAME src = "second.html"><FRAMESET>

This creates a frame of rows. first.html occupies the first 10% and remaining space will be occupied by second.html file. Keep in mind that if you try to insert <BODY> tag, the frame will not appear on the screen

Attributes used with Frameset Tag

cols: Frames will appear in columns

Bordercolor: Changes the border color of the Frame.

FrameBorder: The possible values are 0 or 1. The frame border will be invisible if you apply 0.

Attributes used with Frame Tag

No resize: Frame Border will not be sizable.

Scrolling: Yes or No. If No, Scrollbars will not appear.

Here is an another example of Nesting of Frames. Here two rows are created and the bottom frame is divided into two columns. Like this we can apply any number of frames provided each such frame should accommodate HTML Files. However, I recommend you to restrict the frame divisions so that the web page looks neat and easier to navigate.

<FRAMESET rows = "10%,*">

<FRAME src = "first.html">

<FRAMESET cols = "50%,*">

<FRAME src = "second.html">

<FRAME src = "third.html">

<FRAMESET>


Like it? Share with your friends!

0

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
win win
0
win
Anand Narayanaswamy
Anand Narayanaswamy is the editor-in-chief of Learnxpress. He was a Microsoft Most Valuable Professional (MVP) for a period of 9 years. He is a ASPInsider based in Trivandrum, Kerala State, India. Anand is the author of Community Server Quickly published by Packt Publishing.

0 Comments

Your email address will not be published. Required fields are marked *