The first rule to follow when using FRAMES is to replace the BODY tag with the FRAMESET tag.
FRAMES can be set up in either a row or column configuration. The first FRAMESET tag determines which set up is chosen.
Codes 1 and 2 (below) are diagrams of a row configuration.
The first and defining FRAMESET code:
For code 2:
The SRC or source attribute is used to name the html page that will be located within the appropriate FRAME.
Example:
Codes 3 and 4 (below) are diagrams of a column configuration.
The first and defining FRAMESET code:
Each individual FRAME within the FRAMESET must now be defined by either a FRAME or FRAMESET tag. If the FRAME is a single row it is defined with a FRAME tag. If it contains multiple rows it is defined by a second FRAMESET tag.
For code 4:
The SRC or source attribute is used to name the html page that will be located within the appropriate FRAME.
src="index.html"
TARGET
When using FRAMES, each individual FRAME within a FRAMESET will contain either an html page or an image.
Some of the FRAMES will be static (information will never change) , others will be dynamic (information will change).
For a FRAME to be dynamic it requires a name. You will then use the target attribute to send different html pages to it.
Below we will label each individual FRAME within the FRAMESET.
Frame A will be a static frame containing hyperlinks to fill Frame C.
Frame B will be static and will contain the heading of our Document.
Frame C will be dynamic and you will use it to display different pages, chosen in Frame A.
To do this we must:
1. Give a name to Frame C.
2. Create a Heading page and assign it to Frame B.
3. Create a links page, Assign it to Frame A and use target to send the pages to Frame C
The code:
Scroll bars will appear automatically by default if a document is too large for a frame.
The code for the scrolling attribute would be: