Framify

Tag: <frameset>

<frameset> Syntax

Syntax Diagram for <frameset>
Opening Tag Content Closing
Tag
Open Parameter = Value Close
<frameset rows = value [,. . .] > framesets
and/or
frames
and/or
"noframes"
sections
</frameset>
value% [,. . .]
value* [,. . .]
* [,. . .]
cols = value [,. . .]
value% [,. . .]
value* [,. . .]
* [,. . .]
frameborder = yes
no
border = pixels
bordercolor = color

Syntax Diagram for <frame>
Open Parameter = Value Close
<frame src = "url" >
name = "name"
noresize
scrolling = yes
no
auto
marginheight = pixels
marginwidth
frameborder = yes
no
bordercolor = color

Syntax Diagram for <noframes>
Opening Tag Content Closing Tag
<noframes> text </noframes>

<frameset> Description

The <frameset>. . . </frameset> tags define a frameset, which contains one or more subordinate framesets or frames. A frameset may also include a no-frames section, which is explanatory text for those who may have a browser that does not understand frames.

Note
A web page can have either a <frameset> section (which describes where content should be placed) or a <body> section (which actually defines content), but not both; they are mutually exclusive.

rows
Specify the number of rows into which the browser window is divided. The value parameter is interpreted in one of four ways; if it is:

For example, rows="100,15%,*,2*" defines four frames, stacked one on top of the other. The first (top) frame is 100 pixels high, the second frame's height is 15% of the current window (or frame) height, and the third and fourth frames occupy the remaining space, the fourth (bottom) frame being twice the height of the third.

If your row specifier comes up with a nonsensical results, such as three rows whose heights are "50%,30%,40%", the browser obviously cannot obey your directives. It complies, however, in a pretty reasonable way: it normalizes your values so that they fit into your window. In this example, the 50%, 30%, and 40% add up to 120% of the window height. Since this is ridiculous, the browser notices that the sum is 6/5 the value it's supposed to be, and it multiplies the component values by 5/6 to compensate, resulting in 412/3%, 25%, and 331/3%, respectively.

cols
Specifies the number of columns a window (or frame) is to be divided into. cols affects width exactly the way rows affects height.
frameborder
Specifies whether or not you want these frames to have 3D borders (frameborder=yes) or not (frameborder=no).
border
Specifies the thickness of the border between frames, expressed in pixels. Note: if your frame borders are of zero width, the user won't be able to resize the frames by dragging the borders.
bordercolor
Specifies the color of the borders. Color is specified in the same manner as for the <body> tag.
src
Specifies the URL of the HTML document you want to put into the frame.
name
Specifies an identifier that anchor tags <a href=...> reference in their target parameter, so a click in one frame can load a document into another.
noresize
Specifies that this frame cannot be resize by dragging the frame border.
scrolling
Specifies the scrollbar's presence. Reasonably enough, "yes" means that the scroll bar is to be present at all times, "no" means that the scroll bar is never to be present, and "auto" means that the scroll bar is to be present only when the current page is long enough to warrant it.
marginheight, marginwidth
Specify the margin height (the distance, in pixels, from the top of the frame to the topmost text or graphic and from the bottom of the frame to the bottommost text or graphic) and the margin width (the distance, in pixels, from the left edge of the frame to the leftmost text or graphic and from the right edge of the frame to the rightmost text or graphic), respectively.

<frameset> Example

Here's the frameset definition that this HTML Quick Reference uses: <html> <head> <title>HTML Quick Reference</title> </head> <frameset cols="150,*" border=5> <frameset rows="160,*" border=5> <frame src="TOTOC.html" scrolling=off> <frame name="TOC" src="AlphaTOC.html" scolling=auto> </frameset> <frame name="Content" src="Welcome.html" scolling=auto> </frameset> </html>
Last Modified: Thursday, 24-Dec-2009 14:41:26 MST