Home » Web Development » 04 - Frames, Forms, and More
4

Frames

Explains how frames are developed in html

HTML documents may be organized in frames. A frameset allows many frames to be loaded into the browser. Each frame contains a separate web page. Frames are used in situations where parts of a page change constantly with each request while other parts remain the same. For example, an online book may contain a clickable table of contents on the left hand side of each page of the book. It would make sense to split this book up into two frames - the frame on the left (or sidebar) would contain just the table of contents while the main frame would contain a single page from the book. This way, only the page contents will change with each request for a new page. The frameset tag does not have a header or body tag of its own - the html page that makes up each frame contains its own header and body. The example below shows a frameset that shows an advertisement on the top panel, a table of contents on the side panel and a chapter in the main panel. To view this faremset on your browser, Click Here

<html>
<frameset rows="20%,*" />
  <frame src ="ad.htm" />
  <frameset cols="30%,*" />
      <frame src ="toc.htm" />
      <frame src ="Chapter1.htm" />
  </frameset>
</frameset>
</html>
ScreenShot 4a: Frame Sample Output

ScreenShot 4a: Frame Sample Output