Framing the Web / Frames Cheat Sheet
Frames Cheat Sheet
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"] >
- file.html is the name of the HTML file to display in the frame.
- framename is the name assigned to the frame for use in conjunction with TARGET.
scrolling
determines whether the frame has scrollbars.scrollbars embedded in a frame
- *
noresize
is a flag that specifies the user cannot resize the frame. - *
marginwidth
andmarginheight
determine the frame's margins in pixels.Margins 0 20
measurement list is a comma-delimited list of absolute, relative, or percentage measurements, one for each frame in the frameset.
Place HTML code on your frameset document between NOFRAMES tags for people using frames-incapable browsers.
This is the standard There are four kinds of magic targets, all of which begin with an underscore (_):
Comments are welcome Copyright © 1996 Dan Brown and URL: https://webreference.com/dev/frames/summary.htmlThe 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)"]>
Examples:
<frameset rows="50,120,600">...</frameset>
<frameset cols="2*,*">...</frameset>
<frameset cols="20%,60%,20%">...</frameset>
<frameset rows="80,*">...</frameset>
<frameset framespacing="0" frameborder="0" border="0" cols="155,*">
<frameset frameborder="3" bordercolor="#ededed" border="3" cols="155,*">
The NOFRAMES Tag
<noframes>...</noframes>
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">
anchor
tag with the addition of the target
attribute.
frame
tag. An unrecognized windowname will cause another browser to spawn.
"Magic" TARGETS
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.
Created: May 14, 1996
Revised: Apr. 16, 1998