HTML <frame> Tag

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Embedded (Legacy)

What You’ll Learn

By the end of this tutorial, you’ll understand legacy frame markup and the modern iframe and CSS techniques that replaced it.

The HTML <frame> tag was used to create frameset layouts that split a browser window into multiple panes. This guide covers historical syntax, attributes, and why you should use iframe and CSS in all new projects.

01

Historical Syntax

How <frame> worked inside frameset.

02

Obsolete Status

Why HTML5 removed frames entirely.

03

Key Attributes

src, name, scrolling, noresize.

04

frame vs iframe

Window-splitting vs inline embedding.

05

iframe Replacement

Modern HTML5 pattern for embedded content.

06

Legacy Maintenance

Recognize frames in old HTML tutorials.

What Was the <frame> Tag?

The frame element (<frame>) defined individual panes within a <frameset> layout. Each frame loaded a separate HTML document, allowing developers to display multiple pages simultaneously in one browser window.

⚠️
Obsolete in HTML5 — Use iframe + CSS

Do not use <frame> or <frameset> in new projects. Modern browsers do not support framesets in HTML5 documents. Use iframe and CSS grid or flexbox instead.

Frames caused accessibility, bookmarking, and SEO problems. HTML5 removed them entirely. Learn frame to read legacy code, but build layouts with contemporary tools.

📝 Syntax (Historical)

The <frame> tag was placed inside <frameset>, not inside the body of a normal HTML5 page:

syntax.html
<frameset cols="25%,75%">
  <frame src="sidebar.html" name="sidebar">
  <frame src="content.html" name="main">
</frameset>

Syntax Rules

  • frame must be a direct child of frameset (not of body).
  • frame is a void element — no closing tag in HTML syntax.
  • Use cols or rows on frameset to define pane sizes.
  • Include noframes fallback content for browsers without frame support.

⚡ Quick Reference

PatternCode SnippetNotes
Two columns<frameset cols="50%,50%">Obsolete layout
Two rows<frameset rows="50%,50%">Horizontal split
Load document<frame src="page.html">Each pane = separate page
Named framename="mainFrame"Target for links
Modern replacement<iframe src="...">Valid HTML5 embed
HTML5 statusObsoleteRemoved from specification

⚖️ <frame> vs <iframe>

Both load external documents, but only iframe fits modern HTML:

Feature<frame><iframe>
HTML5 statusObsoleteValid, widely used
Parent elementframesetAny flow content (e.g. div)
Layout scopeSplits entire browser windowEmbeds inline in one page
AccessibilityPoor (removed for good reason)Supports title, focus, sandbox

⚖️ <frame> and <frameset>

These legacy elements worked together as a split-window layout:

ElementRoleWhen used (historical)
<frameset>Layout containerDefine columns or rows for the window
<frame>Individual paneLoad one HTML document per pane
<noframes>Fallback contentMessage when frames unsupported
TodayUse CSS grid + iframe instead

🧰 Attributes

The <frame> tag had these historical attributes. All are obsolete in HTML5:

src Required

URL of the HTML document to display in the frame pane.

src="content.html"
name Navigation

Name used as a link target (target="frameName" on anchors).

name="mainFrame"
scrolling Deprecated

Control scrollbars: auto, yes, or no.

scrolling="auto"
noresize Boolean

Prevent users from dragging frame borders to resize panes.

noresize
attributes.html
<frame src="content.html" name="mainFrame" scrolling="auto" noresize>

The entire frame element is obsolete. Use iframe with title and optional sandbox in new projects.

Examples Gallery

Historical frame patterns plus the modern iframe replacement. Legacy examples are for learning only—do not use in new code.

Live Preview

Visual mockup of how a two-column frameset layout looked (modern browsers no longer render framesets):

Creating Frameset Layouts

The primary purpose of <frame> was to divide a window into multiple panes using frameset.

⚠️ Obsolete tags — for learning only.
creating-frameset-layouts.html
<frameset rows="50%,50%">
  <frame src="topContent.html" name="topFrame">
  <frame src="bottomContent.html" name="bottomFrame">
</frameset>
Try It Yourself

📚 Common Use Cases (Historical)

Developers once used <frame> for fixed navigation sidebars, split documentation views, and embedding external pages in a pane. Today use CSS layout with iframe, server-side includes, or a single-page application architecture instead.

Frame Attributes

Control scrolling, resizing, and the document loaded in each pane with frame attributes.

attributes.html
<frame src="content.html" name="mainFrame" scrolling="auto" noresize>
Try It Yourself

Embedding External Content

Frames could load external URLs in a pane. The same idea today uses iframe inside a normal page.

embedding-external-content.html
<!-- Historical (obsolete) -->
<frame src="https://example.com" name="externalFrame">

<!-- Modern replacement -->
<iframe src="https://example.com" title="Example site"></iframe>
Try It Yourself

Modern iframe Replacement

Use CSS grid with iframe elements to achieve split layouts in valid HTML5.

iframe-replacement.html
<div class="split-layout">
  <iframe src="sidebar.html" title="Sidebar"></iframe>
  <iframe src="content.html" title="Main content"></iframe>
</div>
Try It Yourself

Modern Layout Replacement (CSS + iframe)

Replace frameset splits with CSS grid and iframe panes:

grid Split columns/rows
iframe Embed each pane
title Accessibility label
sandbox Restrict embedded content
split-layout.css
/* Modern split layout (replaces frameset) */
.split-layout {
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 0.5rem;
  min-height: 400px;
}

.split-layout iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

Live CSS + iframe split

♿ Accessibility

Frames were removed partly due to accessibility failures:

  • Do not use frame — screen readers struggled with frameset navigation and focus.
  • Use iframe with title — always add a descriptive title on iframe elements.
  • Prefer single-page layouts — one document with semantic landmarks is easier to navigate.
  • Consider sandbox — restrict third-party iframe capabilities when embedding external content.

🧠 How <frame> Worked

1

Author defined a frameset

frameset split the window into columns or rows.

Markup
2

Each frame loaded a document

src pointed to a separate HTML page per pane.

Rendering
3

HTML5 replaced frames

iframe and CSS layouts solved the same problems without breaking UX.

Evolution
=

Today: use iframe + CSS

Learn frame for history. Build with iframe and grid in all new projects.

Browser Support

<frame> and <frameset> are obsolete and not supported in HTML5 documents. Modern browsers will not render frameset layouts.

Obsolete · Use iframe + CSS

Not supported in HTML5

Frame and frameset were removed from the HTML5 specification. Legacy IE supported them, but current Chrome, Firefox, Safari, and Edge do not render framesets in modern documents.

95% Legacy reference
Google Chrome Not in HTML5 · Obsolete
Not supported
Mozilla Firefox Not in HTML5 · Obsolete
Not supported
Apple Safari Not in HTML5 · Obsolete
Not supported
Microsoft Edge Not in HTML5 · Obsolete
Not supported
Internet Explorer Legacy support · EOL
Legacy only
Opera Not in HTML5 · Obsolete
Not supported

Modern replacements

Use these HTML5 approaches instead of frame and frameset.

🔗
iframe Embed external pages inline with title and sandbox
Replacement
🛠
CSS Grid / Flexbox Split layout without multiple top-level documents
Modern
<frame> tag 95% legacy reference

Bottom line: Do not use <frame> in new projects. Use <iframe> and CSS for modern split layouts and embedded content.

Conclusion

While the <frame> tag played a significant role in early web development, its usage is not recommended today. Frame and frameset are obsolete, break accessibility, and are unsupported in HTML5 documents.

Adopt iframe for embedded content and CSS grid or flexbox for split layouts. Plan migrations if you maintain very old frame-based codebases.

💡 Best Practices

✅ Do

  • Use iframe for inline embedded content
  • Use CSS grid or flexbox for split layouts
  • Add title on every iframe
  • Learn frame only for legacy code maintenance

❌ Don’t

  • Use frame or frameset in new projects
  • Split your entire site into multiple frame documents
  • Embed external sites without considering security
  • Assume frames work in modern HTML5 pages

Key Takeaways

Knowledge Unlocked

Six truths every developer should know about <frame>

Bookmark these before you ship — they’ll keep you on modern HTML standards.

6
Core concepts
🗂️ 02

Needs frameset

Frame was always inside frameset.

Structure
🔗 03

Use iframe

Modern inline embed replacement.

Replacement
🛠 04

CSS Layout

Grid/flexbox replaces window splits.

Modern
05

A11y Failures

Frames broke navigation and SEO.

Accessibility
🌐 06

Not in HTML5

Modern browsers skip framesets.

Compatibility

❓ Frequently Asked Questions

It defined individual panes inside a frameset, each loading a separate HTML document in a split browser window.
No. frame and frameset are obsolete and removed from the HTML5 specification.
Use iframe to embed content inline and CSS grid or flexbox for split layouts.
frame split the entire window via frameset (obsolete). iframe embeds content inside a page and is valid HTML5.
No. Beginners should learn iframe and CSS layout. Study frame only to read legacy HTML.

Build Modern Layouts

Replace obsolete frames with iframe and CSS grid in the interactive HTML editor.

Try iframe replacement →

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.

6 people found this page helpful