Saturday, November 24, 2012

HTML Frames

With frames, several Web pages can be displayed in the same browser window.
Note:Do not expect frames to be supported in future versions of HTML.
Frames allow for multiple .html documents to be displayed inside of one browser window at a time. This means that one page has no content on it, but rather tells the browser which web pages you would like to open. With the addition of CSS and PHP, frames have become outdated.
The disadvantages of using frames are:
  •     Frames are not expected to be supported in future versions of HTML
  •     Frames are difficult to use. (Printing the entire page is difficult).
  •     The web developer must keep track of more HTML documents
The HTML frameset Element
The frameset element holds one or more frame elements. Each frame element can hold a separate document.
The frameset element states HOW MANY columns or rows there will be in the frameset, and HOW MUCH percentage/pixels of space will occupy each of them.
The HTML frame Element
The <frame> tag defines one particular window (frame) within a frameset.
In the example below we have a frameset with two columns.
The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The document “frame_a.htm” is put into the first column, and the document “frame_b.htm” is put into the second column:
<frameset cols=”25%,75%”>
<frame src=”frame_1.htm” />
<frame src=”frame_2.htm” />
</frameset>
Note: The frameset column size can also be set in pixels (cols=”200,500″), and one of the columns can be set to use the remaining space, with an asterisk (cols=”25%,*”).

Frameset Attributes
COLS: how many cols in the frameset
ROWS: how many rows in the frameset
FRAMEBORDER: if the frames should have borders
FRAMESPACING: space between the frames
BORDER: space between frames
BORDERCOLOR: color of frame borders

No comments:

Post a Comment