Contents - Index - Previous - Next


HTML Frames


Web Concordances are normally laid out using frames. This is a brief introduction to frames in HTML. 

Frames are a way of splitting the window of a web browser into several smaller windows.  Web Concordances use frames in order to present the wordlist, the concordance, and the source text at the same time.  There are two pre-defined frame styles available in Concordance, but if you understand frames you can easily alter them as you please using HTML Setup.

As some browsers do not support frames, you should always include a no-frames section along with your frames, even if it does no more than offer a brief apology. See below for an example.

There are two key elements in creating frames. First you write an HTML file using the <frameset> tag to define how you want to split up the browser window into sections. Then you must supply some contents for each of the sections; each comes from a different HTML file, and you specify the names of those files with the <frame> tag.

The <frameset> tag can define either rows or columns, depending on which option is chosen. If you write <Frameset rows="25%,25%,*">, you will split the browser window into three rows, the first two each occupying 25% of the browser's height, and the third row (marked with *) occupying the rest.

A command of <frameset cols="25%,25%,*"> does exactly the same thing, except in this example, columns are defined instead of rows.

You may create multiple columns and rows by nesting the <frameset> tags. Here is an example:

<HTML>
<Head>
<Title>Frames Example</Title>
</Head>
<Frameset rows="20%,*">
<Frame src="toprow.htm" name="title_area">
<Frameset cols="20%,*">
<Frame src="leftcol.htm" name="menu_area">
<Frame src="display.htm" name="display_area">
</Frameset>
</Frameset>
<Noframes>

Text you place here will be seen only by those who are using a browser that does not support frames. 

</Noframes>
</HTML>

On a frames-capable browser, this example would produce a display with a title row at the top, a menu column at the left, and a large display area at the lower right. 

A set of frames like these would allow the user to choose from the menu frame amongst different pages. Each page chosen would be displayed in the display area, while the menu remained on screen. The links in the menu frame (i.e. in the file leftcol.htm) would be similar to this:

<A href="choice.htm" Target="display_area">Make this choice!</A>

When using links with frames, you have to specify a target, as above, to tell the browser which frame you want the linked file to be loaded into. The target uses the names for each frame which you defined in the frameset.

To summarise: The first page sets up the frame system and ought also to provide for a non-frame version of its contents. All subsidiary pages use the frame system that is set up in the first page.

There is plenty more to learn about frames. See any book on HTML or look on the Web.

If you are using Microsoft Internet Explorer 5.0 and find your frame borders are invisible, see Frequently Asked Questions.

Other related topics

Acknowledgment: this help topic is modelled on material by Paul Lutus, creator of Arachnophilia, a useful HTML editor, available from http://www.arachnoid.com.