Frame tags


By means of FRAMES, you can create 'windows' inside of your web pages. That's may be helpful in order to build a menu bar. Just as a sample, you can, say, split your web page into 2 windows: each of them containing a different document. However you can use more than 2 FRAMES inside of a FRAMESET. Let's see <FRAMESET> and <FRAME> tags:

<FRAMESET ROWS="%,%,%,..." COLS="%,%,%,..." FRAMEBORDER="yes/no" BORDERCOLOR="#nnnnnn" BORDER="number" ></FRAMESET>

Where:

  1. ROWS means the percentage of page's space spanned by the frame (horizontal space).
  2. COLS means the percentage of page's space spanned by the frame (vertical space).
  3. FRAMEBORDER defines a border. It may be YES or NO.
  4. BORDERCOLOR defines the border's color.
  5. BORDER defines the border's thickness.

Each frameset, may contains one or more frames. So you have to know the <FRAME> tag too:

<FRAME SRC="url" NAME="something" MARGINWIDTH="number" MARGINHEIGHT="number" SCROLLING="yes/no/auto" NORESIZE>

Where:

  1. SRC defines the URL where the document you want to show here is located.
  2. NAME is the frame's name.
  3. MARGINWIDTH defines the margin's width
  4. MARGINHEIGHT defines the margin's height
  5. SCROLLING defines the scroll bar. It may be YES (the frame has a scroll bar), NO (the frame hasn't a scroll bar), AUTO (depending on text contained inside of the frame).
  6. NORESIZE: usually users can change the frame's size. If you use NORESIZE option, users won't be able to change the frame's size.

If you don't insert a FRAME inside of a FRAMESET, you have to use this tag:

<NOFRAMES></NOFRAMES>

Look at this sample...

And this is the HTML page's source:

<HTML>
<HEAD>
<FRAMESET COLS="20%,80%">
<FRAME SRC="
color="#00FF00">frame1.htm
color="#FF0000">" NAME="fr1">
<FRAME SRC=" color="#00FF00">frame2.htm color="#FF0000">" NAME="fr2">
</FRAMESET>
</HEAD>
<BODY>
</BODY>
</HTML>

And this is the 'frame1.htm' page's source:

<HTML>
<HEAD>
</HEAD>
This is frame1!
<BODY>
</BODY>
</HTML>

And this is the 'frame2.htm' page's source:

<HTML>
<HEAD>
</HEAD>
<BODY>Hi! Welcome to frame2!
</BODY>
</HTML>

As you can see, you should define a FRAMESET containing at least 2 FRAMES...


Index           Home  Back  Forward       About  Contact us!

Copyright (c) 1998-2006 Wowarea