Nesting and RecursionBy nesting we mean placing a table within a table, or a frameset within a frameset. By recursion we mean "well-defined self-reference" [1]. Nesting of TablesWhen nesting tables, you place a table within a cell of another table. In general the nesting of tables is not a good idea. The proper layout for tables is not easy to compute, and the more tables, and the more nest-tables are on a page, the harder that page is to display (and the longer it will take to load). One use of nested tables is to provide colored borders around tables. One makes tbe background of the "outer" table the border color; the "inner" table is then given another color. An example is demonstrated in this excerpt from the GDGSA main page. Nesting of FramesOn the previous page several examples of nested frames were given. In tables, a nested table is placed within a table cell; in frames, the nested frameset takes the place of the frame that would normally go there. Furthermore, the src of a frame can be another HTML document containing framesets. The following examples demonstrate a series of nested frames. There are eleven different examples. RecursionA truly recursive frameset would have page A consist of a frameset; each frame on page A would then have src="A", thus referencing A. Ideally, the framed As would also frame A, etc. In most browsers, however, this does not happen, but there are work-arounds to achieve similar results. The easiest is for page A to have a frameset, and for each frame to call B. B then has a frameset, and the frames call A. In a similar fashion, but so as not to cause infinite recursion, one can simply use a chain of framesets (A calls B, calls C, ... calls Z, and then ends). That is the key behind a series of pages I have titled "Browser Torture." In a webpage you can write a <meta> tag in the page head that causes the page to reload or load another page. This can be useful for loading a sequence of different pages in a given frame. Further Examples
Be aware that these nested framesets have crashed some browsers. This site © copyright 1999, Steve Krause, all rights reserved. |