HTML <frameset> Tag

Beginner
6 min read
Updated: Oct 2026
4 examples
Live preview

Definition and Usage

The <frameset> element was a container for panes. In legacy documents it replaced <body> and held <frame> children (or nested framesets).

Do not use it in new pages. Build split layouts with CSS Grid or Flexbox, and embed other documents with <iframe>. Old markup sometimes included <noframes> as a text fallback.

Deprecated · Obsolete.

Removed from the HTML living standard. Avoid in every new project — prefer CSS layout or <iframe>.

Not a layout tool for modern HTML.

A frameset document had no normal <body>. Today one document plus CSS (and optional iframes) covers the same goals more safely.

HTML Syntax

syntax.html
<frameset cols=" sizes">…</frameset>

Historical form only. Children were <frame>, nested <frameset>, or <noframes>. Prefer this modern approach for a two-pane page:

prefer.html
<div class="layout">
  <nav>…</nav>
  <main>…</main>
</div>

Attributes

MDN lists these frameset-specific attributes. Do not use them in new work.

AttributeDescriptionTry it
colsDeprecated. Column widths (for example 30%,70% or 200,*)Try it
rowsDeprecated. Row heights (for example 100,* or 20%,80%)Try it

Global Attributes

The <frameset> tag also supports the Global Attributes in HTML.

Live Preview

Compare concept column and row splits with a modern CSS Grid layout. HTML5 pages cannot run a live <frameset>.

Study-only. Ship CSS Grid or <iframe> — never <frameset>.

Preview

Concept cols="30%,70%" — not a real frameset.

HTML Examples

Short, copy-ready snippets. Use Try It Yourself for a live editor.

Example 1 — Column Frameset (cols)

Side-by-side panes. Historical document — recognize it; do not ship it.

HTML
<frameset cols="30%,70%">
  <frame src="nav.html" name="nav">
  <frame src="main.html" name="main">
  <noframes>
    <p>This page used frames.</p>
  </noframes>
</frameset>
Try It Yourself

How It Works

  1. Use <frameset> instead of <body> in the legacy document.
  2. Set cols to a comma-separated list of widths.
  3. Add one <frame> per column with its own src.
  4. Optional <noframes> for a text fallback — still obsolete today.

Example 2 — Row Frameset (rows)

Stacked panes — for example a thin banner over the main area.

HTML
<frameset rows="80,*">
  <frame src="banner.html" name="banner">
  <frame src="content.html" name="content">
</frameset>
Try It Yourself

How It Works

  1. Set rows instead of cols for horizontal bands.
  2. Use pixel or percent sizes, and * for leftover height.
  3. Order of <frame> tags matches the order of sizes in rows.
  4. Do not rebuild this — a header + main in one page is clearer.

Example 3 — Nested Frameset

Old sites nested framesets for L-shaped layouts. Historical pattern only.

HTML
<frameset cols="200,*">
  <frame src="nav.html" name="nav">
  <frameset rows="80,*">
    <frame src="banner.html" name="banner">
    <frame src="main.html" name="main">
  </frameset>
</frameset>
Try It Yourself

How It Works

  1. Outer frameset splits columns (sidebar + rest).
  2. Inner frameset fills the “rest” column with rows.
  3. Each leaf pane is still a <frame> with its own document.
  4. Migrate to CSS Grid so the whole UI stays one accessible page.

Example 4 — CSS Grid Replacement

Same idea as nested panes, valid HTML5, one document.

HTML
<div class="layout">
  <nav>Sidebar</nav>
  <header>Banner</header>
  <main>Content</main>
</div>

<style>
  .layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: 80px 1fr;
    grid-template-areas:
      "nav banner"
      "nav main";
  }
  nav { grid-area: nav; }
  header { grid-area: banner; }
  main { grid-area: main; }
</style>
Try It Yourself

How It Works

  1. Keep a normal <body> with semantic regions.
  2. Define a grid with columns, rows, and named areas.
  3. Assign each region with grid-area.
  4. Add <iframe> only if a pane must load a separate document.

Edge Cases & Pitfalls

Most mistakes treat framesets like modern layout or mix them with a normal body.

obsolete

No <body> with frameset

Legacy frameset documents used <frameset> instead of <body>. Mixing both was invalid.

count

Pane count must match sizes

If cols lists three sizes, you need three child panes (frames or nested framesets).

a11y

Multi-document UX

Separate documents per pane hurt titles, focus order, and screen readers. Prefer one page.

seo

Weak for search and sharing

Users saw a composite window; crawlers and bookmarks often saw only one pane URL.

naming

frameset ≠ CSS grid

Do not reach for frameset when you only need columns. Use CSS Grid or Flexbox in a normal document.

Browser Support

Authors must not use <frameset>. Engines may keep limited legacy behavior for old documents; HTML5 sites should use CSS or <iframe>.

✓ Deprecated · Obsolete

<frameset>

Obsolete in the HTML living standard. Do not rely on frameset support in modern documents. Migrate to CSS Grid for layouts and iframe for embeds.

N/A Do not use in new HTML
Google Chrome Legacy only
Do not use
Mozilla Firefox Legacy only
Do not use
Apple Safari Legacy only
Do not use
Microsoft Edge Legacy only
Do not use
Opera Legacy only
Do not use
Samsung Internet Legacy only
Do not use
Internet Explorer Legacy
Do not use
<frameset> Obsolete (use CSS / &lt;iframe&gt;)

Bottom line: Recognize <frameset> in old markup, then replace with CSS or <iframe>. Never add frameset to new documents.

Key Takeaways

  • Role: <frameset> held panes and replaced <body> — now obsolete.
  • Sizes: cols for columns, rows for stacked bands.
  • Replace layouts: CSS Grid or Flexbox in one document.
  • Replace embeds: titled <iframe> when a nested document is required.

One line: never write <frameset>; write CSS Grid (or <iframe>) instead.

Default CSS Settings

<frameset> was a special document root for panes, not a normal flow box. There is no useful modern default to copy. For layouts today:

default.css
.layout {
  display: grid;
  grid-template-columns: 30% 70%;
  /* or grid-template-rows for stacked panes */
}

Size regions with CSS. Do not revive frameset presentation attributes on new pages.

Frequently Asked Questions

The frameset element replaced body in legacy documents and held one or more frame panes (or nested framesets) so the browser window could show a multi-pane layout.
No. frameset and frame are obsolete and removed from the HTML living standard. Do not use them in new projects.
cols splits the window into vertical columns (side-by-side panes). rows splits it into horizontal bands (stacked panes). Values were sizes like percentages, pixels, or * for remaining space.
Use CSS Grid or Flexbox for multi-pane layouts of your own content. Use iframe only when you need to embed another document.
Yes historically — nested framesets built more complex grids. That pattern is obsolete; nest CSS grid areas instead.
noframes sat inside frameset and held fallback content for browsers without frames. It is obsolete along with frameset.

Next: head

Learn the document metadata container used in every HTML page.

head tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful