Intro to FramesFrames are an advanced HTML technique that allow you to divide pages into separate sections that scroll independently, with each section displaying the contents of a separate HTML document. This online textbook is an example of the use of frames. (You can see another example at http://slumberland.org/gene/.)In each chapter, there is a menu bar on the left side of the window, and content on the right side. You can scroll the content on the right side up and down, and the menu will not move. Frames are a bit different from the HTML you're used to. When you create frame pages, instead of creating a normal page with a BODY, you create a page called a FRAMESET. The frameset is merely a structure. It doesn't contain any content at all. Inside the frameset structure are FRAMES, which link to outside content. Then, when the frameset page is viewed in the browser, the outside content is displayed in the frames. For example, this page that you see now is a frameset with three frames, the header frame, the menu frame, and the content frame. The header frame links to a separate page that contains a red background, and the words "Chapter Eight." The menu frame links to a separate page that contains a yellow background, and the menu. And the content frame links to a separate page that contains the content you're reading now. When you look at this page, you're seeing the result of four different pages. Basic Frame TagsLet's take a look at the basic frame tags before we try our hand at some frames.
|