Tag frameset

The frameset tag was used instead of <body> in older versions of HTML to divide the browser window into multiple resizable sections (called frames). Each section would load a separate HTML document using the <frame> tag.

🔥 Deprecated in HTML5. Modern websites should use CSS layout techniques like Flexbox, Grid, or <iframe>.


✅ Basic (Legacy) Syntax

<frameset cols="30%,70%">
<frame src="menu.html">
<frame src="main.html">
</frameset>

This divides the window into two vertical frames:

  • Left (30% width): menu.html
  • Right (70% width): main.html

📐 Attributes

AttributeDescription
colsDefines columns (e.g., "25%,75%")
rowsDefines rows (e.g., "100px,*")

🧩 Example: Rows and Columns

<frameset rows="50%,50%">
<frame src="top.html">
<frameset cols="50%,50%">
<frame src="bottom-left.html">
<frame src="bottom-right.html">
</frameset>
</frameset>

This creates:

  • A top half frame
  • A bottom half split into two columns

❌ Why It’s Deprecated

  • Poor accessibility and usability
  • Breaks bookmarking and navigation history
  • Doesn’t work well with search engines
  • Incompatible with responsive design
  • Obsolete in modern browsers and HTML5

✅ Modern Replacement

Use CSS layout systems like:

  • Flexbox
  • CSS Grid
  • <iframe> for embedding external content

✅ Example using <iframe>:

<div style="display: flex;">
<iframe src="menu.html" width="30%"></iframe>
<iframe src="main.html" width="70%"></iframe>
</div>

✅ Summary

Tag<frameset>
PurposeDivide browser window into frames
Used with<frame>
Status❌ Deprecated in HTML5
Modern Use❌ Not supported in new HTML projects
Replacement✅ CSS + <iframe>