|
|
|
| Lesson #12: Frames, Part One--Creating Framesets Vocabulary
Process Flow
Background
The following lesson will describe how to define a frameset and set its initial target pages. More Background Consider using frames in a limited fashion. Usually, the best use for frames is to establish a stable list of navigation links. Because the content of frames function as independent web pages, navigation links can remain accessible, while the content in the other frames may vary. The rules that apply to individual web pages also apply to frame contents. For instance, if you want a frameset to be the first page that your viewers see when they connect to your site, then this frameset must be named "index.htm" or "default.htm." A frameset is a container that holds individual frames within a site. A frameset needs to be named, just as individual pages need to be named. Individual frames also are named, though the function of frame names is different. While a frameset name is needed in order for a frameset to be displayed in a browser window, frame names are used to help locate individual web pages within specific frames. For instance, in the graphic above, the frameset (the entire collection of individual frames) might be named "index.htm." The left frame might be named "links," while the right frame could be called "content." Here's where the difference lies. Frame names help you identify where individual web pages will be displayed within your site; they are used to help you figure out where to place your content. Viewers, on the other hand, will never need to use frame names to access material. It is a little confusing, right? Once you build your first frameset, these basic principles should become more evident. Step One: Creating Your Frameset Container IMPORTANT: This discussion assumes that you have already created several independent web pages. For the purposes of this demonstration, I already created a paged named "left.htm" and a paged named "right.htm." In your Explorer view, go to the File menu item, select New, then select Page:
In the New window, click on the Frames Page tab to display your frameset options:
Please note that you can click on each option to display a preview in the lower right corner of this window. Select the frameset style by clicking on one of the available options, and then clicking on OK. For the purposes of this lesson, I selected the option named Contents; again, notice how this option is previewed in the lower right corner of this window:
After you click New, the New Frameset creation window will be displayed. In this window, you can specify the location of your target frames:
Remember, each frame functions independently, and any page can be displayed in a given frame. Generally, it is easier to create independent pages first, and then plug them into your frameset; before creating my empty frameset, I developed and saved the two pages that I will use as my initial pages. Clicking on the Set Initial Page option in each frame enables me to specify the page that will be displayed in this location:
In the example above, I clicked the Set Initial Page button located in the left frame, which displays the Create Hyperlink window. I select the file labeled left.htm, which will be the page displayed in the left frame:
I follow the same process in the right frame, this time selecting the file right.htm as the page that is displayed in this location. Again, you can display any page in either frame, and I used the names left.htm and right.htm only as a matter of convenience for this demonstration. Displayed below is the completed frameset:
Step Two: Saving Your Frameset After you have created your frameset and set your initial target pages, it is a good idea to save your work. When you select the Save option, you will note that the save window appears slightly different than normal:
Note that on the right side of the save window, you see a schematic of your frameset. With frames, it is important to remember that you are working with both individual web page files and the overall frameset, which is the container that holds these files. In the example above, the two individual web pages, left.htm and right.htm, already have been saved before they were incorporated into the frameset. On the other hand, the frameset itself also needs to be saved. Just as you would with any individual web page, you need to specify a file name; if your frameset is going to be the first item that you want your readers to see when they connect to your website, then name your frameset either default.htm or index.htm. Otherwise, you can give your frameset any name that you wish. After clicking the Save button, you now are ready to develop additional pages for your frameset. As a reminder, pages are objects independent of your frameset; the frameset is simply the container that displays multiple pages within the same browser window. Summary This lesson demonstrates how you can set up a frameset to display multiple pages within the same browser window. The next lesson will explore how you can create links to additional pages and sites within this frameset.
|
|
|