Frame Tags
The Frame Tags
There are three tags you need to know to create frames (four if you include an Internet Explorer tag).
The frameset takes the place of the body of your HTML. It is loaded instead of a straight HTML page. So the start of your framed page should always have:
<html>
<head><title>Title</title></head>
<frameset>
You define the number and location of frames within the frameset tag. You define rows and columns and their size. This is the only required attribute for the frameset tag.
Rows and cols accept a quote-enclosed, comma delimited list of values that specify the absolute (in pixels) or relative (in percentages) size of the frames.
Examples:
If you are anything like me, you can't add (or don't want to), but framesets are flexible.
If you use an asterisk (*), that will represent all the remaining space. So, to make the above examples more flexible, you could write:
The other attributes of the frameset tag are:
None of these tags are defined in the frames specification of HTML 4.0 as part of the frameset tag. However, Netscape and Internet Explorer support different aspects of them.
There are three tags you need to know to create frames (four if you include an Internet Explorer tag).
- frameset
This is the grouping of frames that makes up the window for the browser. It must include the </frameset> tag. - frame
This defines what document goes into the frameset. - noframe
Browsers that can't show frames will show what is found in the noframes portion of the page - iframe
This is an inline frame that behaves similarly to an inline image. It is an IE extension.
The frameset takes the place of the body of your HTML. It is loaded instead of a straight HTML page. So the start of your framed page should always have:
<html>
<head><title>Title</title></head>
<frameset>
You define the number and location of frames within the frameset tag. You define rows and columns and their size. This is the only required attribute for the frameset tag.
Rows and cols accept a quote-enclosed, comma delimited list of values that specify the absolute (in pixels) or relative (in percentages) size of the frames.
Examples:
- <frameset rows="100,200,300">
defines a three frame page with absolute frame sizes. The top row is 100 pixels, the middle is 200, and the bottom is 300. - <frameset cols="100,200,300">
This is the same type of frameset, only in columns. - <frameset rows="25%,65%,10%">
This frameset has three frames, but their size is based on the size of the browser. The first frame is 25%, the second 65%, and the third 10%.
If you are anything like me, you can't add (or don't want to), but framesets are flexible.
If you use an asterisk (*), that will represent all the remaining space. So, to make the above examples more flexible, you could write:
- <frameset rows="100,200,*">
This frameset has three frames, 100 pixels, 200 pixels, and whatever is left of the browser window. - <frameset cols="100,*,300">
You can also put the asterisk in the middle to make fixed right and left frames. - <frameset rows="*,65%,*">
If you use more than one asterisk, they will divide the remaining space up evenly between them.
The other attributes of the frameset tag are:
- border
Defines the border width, in pixels. Netscape only. - framespacing
Defines the number of pixels between frames. This affects all frames and any nested framesets. Internet Explorer only. - frameborder
This disables or enables the border on the frames. 0 or no turns them off. 1 or yes turns them on. - bordercolor
Use a color name or hex triplet as a value to define the color you want the border to be. Netscape only.
None of these tags are defined in the frames specification of HTML 4.0 as part of the frameset tag. However, Netscape and Internet Explorer support different aspects of them.
Source...