|
|
 |
Framing the Web
Conventions:
- Tag syntax appears in
monospaced font.
- Optional attributes appear between [ brackets ].
- Parameter choices are divided by pipes |.
- Author-specified parameters appear in italics.
- Items marked with an asterisk (*) are not currently covered in the tutorial.
Basic Tags
The Basic FRAME Tag
<frame src="file.html" [name="framename"] [scrolling="yes | no | auto"] [noresize] [marginwidth="pixel measurement"] [marginheight="pixel measurement"] >
The Basic FRAMESET Tag
<frameset cols="measurement list"
[border="yes | no | pixels (recommended)"] [bordercolor="HEX TRIPLET OR COLOR NAME"] [framespacing="yes | no | pixels (recommended)"] [frameborder="yes | no | pixels (recommended)"]>
measurement list is a comma-delimited list of absolute, relative, or percentage measurements, one for each frame in the frameset.
- absolute measurements specify the sizes of the frames in pixels.
- relative measurements specify the sizes of the frames, relative to the other frames.
- percentage measurements specify the sizes of the frames as percentages of the whole browser window.
Examples:
- absolute:
<frameset rows="50,120,600">...</frameset>
- relative:
<frameset cols="2*,*">...</frameset>
- percentage:
<frameset cols="20%,60%,20%">...</frameset>
- absolute and relative:
<frameset rows="80,*">...</frameset>
- borderless frames:
<frameset framespacing="0" frameborder="0" border="0" cols="155,*">
- border with color:
<frameset frameborder="3" bordercolor="#ededed" border="3" cols="155,*">
The NOFRAMES Tag
<noframes>...</noframes>
Place HTML code on your frameset document between NOFRAMES tags for people using frames-incapable browsers.
Sample Framesets
| A Simple Frameset |
|
<frameset rows="30%,70%">
<frame src="green.html">
<frame src="purple.html">
</frameset>
|
| A Complex (Nested) Frameset |
|
<frameset cols="*,2*">
<frame src="orange.html">
<frameset rows="30%,70%">
<frame src="green.html">
<frame src="purple.html">
</frameset>
</frameset>
|
Specifying Targets
The TARGET Attribute
<a href="URL" target="windowname">
This is the standard anchortarget attribute.
- windowname is the name of the target window, as specified in the
frame tag. An unrecognized windowname will cause another browser to spawn.
"Magic" TARGETS
There are four kinds of magic targets, all of which begin with an underscore (_):
target="_blank" will cause the URL to load into a new unnamed browser.
target="_top" will target the URL to the entire browser window.
target="_self" will load the URL into the same window.
target="_parent" will load the URL into the frameset's parent window.
     
|