With frames, we can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the other.
The disadvantages of using frames are:
1) the web developer must keep track of more HTML documents2) it is difficult to print the entire page.
The Frameset Tag
- The <frameset> tag defines how to divide the window into frames.
- Each frameset defines a set of rows or columns.
- The values of the rows/columns indicate the amount of screen area each row/column will occupy.
The Frame Tag
The <frame> tag defines what HTML document to put into each frame.
Example:
<frameset cols=”25%,75%”>
<frame src=”a.html”>
<frame src=”b.html”>
</frameset>
Note:
- User wants to prevent the resize the border of frame. You can add noresize=”noresize” to the <frame> tag.
- You cannot use the <body></body> tags together with the <frameset></frameset> tags. However, if you add a <noframes> tag containing some text for browsers that do not support frames, you will have to encose the text in <body></body> tags.
- Add the <noframes> tag for browsers that do not support frames.
Frame Tags
Tag |
Description |
<frameset> |
Defines a set of frame. |
<Frame> |
Defines a set of window (a frame). |
<noframes> |
Defines a no frame section for browsers that do not handle frames. |
<iframe> |
Defines an inline sub window (frame) |
Anonymous User
29-Jul-2019Thanks for sharing.
Anonymous User
08-Oct-2011