Page 63 - DCAP202_Fundamentals of Web Programming
P. 63
Fundamentals of Web Programming
Notes Single-page query and answer displays: Frames designed side-by-side permit queries to
be posed and answered on the same page, with one frame holding the query form, and the
other presenting the results.
Syntax
<HTML>
<HEAD>
</HEAD>
<FRAMESET rows=”33%,33%,33%”>
<FRAMESET cols=”50%,50%”>
<FRAME name=”frame1">
<FRAME name=”frame2">
</FRAMESET>
<FRAME name=”frame3">
<FRAME name=”frame4">
</FRAMESET>
<BODY>
...contents to display in non-frame-capable user agent...
</BODY>
</HTML>
Try to remember the following basic frameset concepts:
The opening FRAMESET tag defines the actual size and layout of the frames.
Using the ROWS and COLS attributes of the FRAMESET tag, you define frames, then fill
them with the FRAME element, or subdivide them with nested FRAMESET elements.
The number of entries in ROWS or COLS attribute values determine how many frames are
displayed and what size they are. If you have both ROWS and COLS, multiply the number
of entries in each attribute value to calculate the total number of frames (i.e., three entries
in the ROWS attribute and four entries in the COLS attribute create a grid of twelve
frames).
The FRAME elements fill the frames defined by FRAMESET, and are applied in the frame
set in a left-to-right, top-to-bottom order.
FRAME elements which include the SRC attribute, define the contents of each frame you
create.
Frames are always rectangular.
The FRAMESET Element
A frameset divides the browser window into rectangular regions. Each such region can be:
A frame, which displays one document. A frame is represented by a FRAME element.
Another frame set, which is itself further divided into frames.
Example: A frame set can contain a frame, plus another frame set containing two frames,
resulting in three frames in all.
An HTML document that contains frames basically replaces the BODY element with the
FRAMESET element.
56 LOVELY PROFESSIONAL UNIVERSITY