HTML encyclopaedia

The frameset tag

Note. This tag is not included in the HTML 3.2 standard.

The container tag <frameset> is used to define a set of frames.

It has two basic mutually exclusive attributes that indicate how the window is to be sub-divided into frames. The attributes are

  1. cols

    The value specifies the width of the columns, the number of columns being inferred from the number of <frame> and <frameset> tags within the container.

    The value of the attribute is a comma-separated list of values which can be either absolute widths in pixels, precentages of the total window width or weighted relative widths. The first two methods should be familiar from their use with tables and images. The final method expresses values in the form n* where n is an integer, all the weighted relatvie widths are added up and the total available width is allocated in accordance with the weights. For example cols=1*,2*,1* give thre frames whose widths are ¼, ½ and ¼ of the total window width. The 1 may be omitted.

  2. rows

    This is used in just the same way as cols only it controls the vertical subdivision of the window.

  3. framespacing
  4. frameborder
Clearly rows and cols are mutually exclusive. If you want to divide your window up into frames thus
  +--------------------------+
  |           F1             |
  +------+-------------------+
  |      |                   |
  |  F2  |        F3         |
  |      |                   |
  +------+-------------------+
you'll have to write HTML something like this
<frameset rows=*,2*>
      <frame name=F1 ...
      <frameset cols=20%,80% ....
              <frame name=F2 ...
              <frame name=F3 ...
      </frameset>
</frameset>


See also <frame> and general notes on frames