The HTML <frameset> tag, provided by W3Schools, is a vital component when creating webpages with separate frames. It enables the creation of multiple browsing windows, or "frames," within a single webpage. This functionalityTwo primary attributes of the <frameset> tag are cols and rows, which dictate the sizing of frames.

Imagine a grid layout on a wall. With <frameset>, you can control how many and where these "frames" appear. The cols attribute determines the number of columns while rows split the frame into rows. For example, cols="200,"200" creates two frames, each 200 pixels wide.

Understanding Frameset Tag Attributes
The <frameset> tag attributes offer flexibility and control over frame layout. Here are the key attributes:

- cols: Specifies the width of the frames as a number of pixels.
- rows: Specifies the height of the frames.
Using Cols Attribute

The cols attribute accepts a comma-separated list of numbers, each representing the width of a frame in pixels. The sum of all numbers determines the total width of the frameset.
For example, cols="50%, 50%" divides the frame into two halves. Be sure to include the percentage sign (%) to denote proportion.
Using Rows Attribute

Rows attribute works similarly to cols, dividing the frame into rows of specified heights. It also accepts a comma-separated list with numbers or percentages.
Remember, the frames created are not scrollable. If one frame consumes too much content, it may push other frames out of view.
_frameset Tag vs Div Tag

While both <frameset> and <div> can divide webpages into sections, they serve different purposes. A frameset creates separate browsing contexts, each with an independent URL. In contrast, a DIV tag divides a single webpage into logical sections with a single URL.
Additionally, <div> is widely supported across websites as it's part of the HTML5 standard. However, <frameset> was deemed obsolete and deprecated in HTML4.




















przegładNOWA Learn from <frameset> Example </h3>
One of the many purposes of the <frameset> tag is to create multi-frame websites, like those often seen on news sites with a left-side navigation menu and a main content area. Let's breakdown an example.
<frameset cols="150,"*""> <frame src="leftframe.html"> <frameset rows="150,*"> <frame src="topframe.html"> <frame src="contentframe.html"> </frameset> </frameset>
The leftmost frame has a width of 150 pixels and displays the content of leftframe.html. The remaining width displays the content of a two-frame set on top and bottom. The top frame is 150 pixels high, displaying topframe.html, and the bottom frame, displaying contentframe.html, takes up the remaining height.
Thus, learning this tag can offer insights into creating more dynamic and interactive layouts. While deprecated, understanding <frameset> provides a deeper understanding of HTML's history and complexity, as well as a grasp on older web structures.