Frames are HTML windows that open multiple documents on a single page. Frames divide a browser window into multiple windows and display different content in each window; it also allows the links defined in one window to be displayed in another window of your choice. We can summarize the features of the frames as follows;
- Each frame has its own URL address.
- Each frame can be given a name.
- Frames can be sized with the dimensions given by the user, or they can be sized automatically.
To create a page with frames in it, it is first necessary to create a basic html file that defines the properties of the frames. The difference of a page with frames from a regular html document is that it uses the <frameset> tag in its content instead of the <body> tag.
There are two parameters to use with this tag. These are the Cols and Rows parameters.
It is one of the parameters used with the <frameset> tag. It is used to divide the screen vertically (in columns) into defined dimensions. The widths of the columns to be created are determined in pixels or percentages (%). The number of columns determines the number of frames.
<FRAMESET COLS="1. column width, 2nd column width, 3rd column width, …”>
It is the tag used to create the frame. With this command, it is determined how many parts the browser window will be divided into (number of frames) and how large these frames will be.
Another parameter used with the <frameset> tag is the rows parameter. It is used to divide the screen horizontally (in rows) into defined dimensions.
<FRAMESET ROWS="1. line width, 2nd line width, 3rd line width, …”>
The <frame> tag is used to determine the pages to be displayed in the content of the frames created with the <frameset> tag.
Some browsers may not support the frame feature. In such cases, a message is written to the page using the <noframe> tag, and the user is provided with the message determined by this command.
2.4. Creating a Nested Frame
The <frameset> tag allows you to use horizontal and vertical frames together in the same window.