Frames & Their Creation

 

Creating Frames – The <frameset> Element:

  • The <frameset> tag replaces the <body> element in frameset documents.
  • The <frameset> tag defines how to divide the window into frames.
  • Each frameset defines a set of rows or columns. If you define frames by using rows then horizontal frames are created. If you define frames by using columns then vertical farmes are created.
  • The values of the rows/columns indicate the amount of screen area each row/column will occupy.
  • Each farme is indicated by <frame> tag and it defines what HTML document to put into the frame.

 

The <frameset> Element Attributes:

Following are important attributes of <frameset> and should be known to you to use frameset.

  • 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, usecols=”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, usecols=”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.

 

 

 

 

 

Registration


A password will be e-mailed to you.

Feedback Form

Name (required)

Email (required)

Feedback