HTML reference

frameset

The <frameset> element divided one browser window into multiple areas and loaded a separate HTML document into each area. It is obsolete, so do not use it for a new site.

What you will learn

  • What <frameset> and <frame> were used for
  • Why frame-based layouts caused usability and accessibility problems
  • How to choose between <iframe>, normal links, and CSS layouts today

What was it?

Older HTML used <frameset> instead of <body> to describe a layout made of independent frames. Each <frame> loaded another document.

<frameset cols="25%, 75%">
  <frame src="navigation.html">
  <frame src="content.html">
</frameset>

The rows attribute divided the window horizontally, while cols divided it vertically. These examples are for understanding older code only.

Why should you avoid it?

Modern alternatives

Use <iframe> for embedded content

When you intentionally embed another page, use <iframe>. Give it a descriptive title, and consider sandbox and responsive sizing.

<iframe src="map.html" title="Store map" loading="lazy"></iframe>

Use normal links for separate pages

For navigation, link to real pages with <a href="...">. Each page can then have a meaningful URL, title, history entry, and accessible structure.

Use CSS for page layout

Use CSS Grid or Flexbox to arrange navigation and content within one document. This keeps the structure understandable and adapts better to different screen sizes.

Related pages