HTML frames were used to divide the browser window into multiple sections, each displaying a different HTML document. The <frameset> tag defined the layout of frames, and <frame> specified the content of each frame. However, frames are now obsolete and not supported in HTML5, having been replaced by more modern layout techniques like CSS Flexbox and Grid. Frames often caused usability and accessibility issues, which led to their deprecation.
Examples (for historical context):
<frameset cols="25%, 75%">
<frame src="sidebar.html">
<frame src="main.html">
</frameset>
<frameset rows="50%, 50%">
<frame src="top.html">
<frame src="bottom.html">
</frameset>
HTML Code:
The Output of the above code:
HTML Frames
Frames are used to divide the browser window into multiple sections, each capable of displaying a different document.
<frameset cols="25%,75%">
<frame src="frame1.html">
<frame src="frame2.html">
</frameset>
Note: The <frameset> element is deprecated in HTML5. Use iframes instead.