Learning Resources
 

frameset Attributes


  • cols: specifies how many columns are contained in the frameset and the size of each column. You can specify the width of each column in one of four ways:

    • Absolute values in pixels. For example to create three vertical frames, use cols="100, 500,100".

    • A percentage of the browser window. For example to create three vertical frames, use cols="10%, 80%,10%".

    • Using a wildcard symbol. For example to create three vertical frames, use cols="10%, *,10%". In this case wildcard takes remainder of the window.

    • As relative widths of the browser window. For example to create three vertical frames, use cols="3*,2*,1*". This is an alternative to percentages. You can use relative widths of the browser window. Here the window is divided into sixths: the first column takes up half of the window, the second takes one third, and the third takes one sixth.

  • rows: attribute works just like the cols attribute and can take the same values, but it is used to specify the rows in the frameset. For example to create two horizontal frames, use rows="10%, 90%". You can specify the height of each row in the same way as explained above for columns.

  • border: attribute specifies the width of the border of each frame in pixels. For example border="5". A value of zero specifies that no border should be there.

  • frameborder: specifies whether a three-dimensional border should be displayed between frames. This attrubute takes value either 1 (yes) or 0 (no). For example frameborder="0" specifies no border.

  • framespacing: specifies the amount of space between frames in a frameset. This can take any integer value. For example framespacing="10" means there should be 10 pixels spacing between each frames.