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

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.
How <frame> worked inside frameset.
Why HTML5 removed frames entirely.
src, name, scrolling, noresize.
Window-splitting vs inline embedding.
Modern HTML5 pattern for embedded content.
Recognize frames in old HTML tutorials.
<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.
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.
The <frame> tag was placed inside <frameset>, not inside the body of a normal HTML5 page:
<frameset cols="25%,75%">
<frame src="sidebar.html" name="sidebar">
<frame src="content.html" name="main">
</frameset>frame must be a direct child of frameset (not of body).frame is a void element — no closing tag in HTML syntax.cols or rows on frameset to define pane sizes.noframes fallback content for browsers without frame support.| Pattern | Code Snippet | Notes |
|---|---|---|
| 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 frame | name="mainFrame" | Target for links |
| Modern replacement | <iframe src="..."> | Valid HTML5 embed |
| HTML5 status | Obsolete | Removed from specification |
<frame> vs <iframe>Both load external documents, but only iframe fits modern HTML:
| Feature | <frame> | <iframe> |
|---|---|---|
| HTML5 status | Obsolete | Valid, widely used |
| Parent element | frameset | Any flow content (e.g. div) |
| Layout scope | Splits entire browser window | Embeds inline in one page |
| Accessibility | Poor (removed for good reason) | Supports title, focus, sandbox |
<frame> and <frameset>These legacy elements worked together as a split-window layout:
| Element | Role | When used (historical) |
|---|---|---|
<frameset> | Layout container | Define columns or rows for the window |
<frame> | Individual pane | Load one HTML document per pane |
<noframes> | Fallback content | Message when frames unsupported |
| Today | Use CSS grid + iframe instead | |
The <frame> tag had these historical attributes. All are obsolete in HTML5:
src RequiredURL of the HTML document to display in the frame pane.
src="content.html"name NavigationName used as a link target (target="frameName" on anchors).
name="mainFrame"scrolling DeprecatedControl scrollbars: auto, yes, or no.
scrolling="auto"noresize BooleanPrevent users from dragging frame borders to resize panes.
noresize<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.
Historical frame patterns plus the modern iframe replacement. Legacy examples are for learning only—do not use in new code.
Visual mockup of how a two-column frameset layout looked (modern browsers no longer render framesets):
The primary purpose of <frame> was to divide a window into multiple panes using frameset.
<frameset rows="50%,50%">
<frame src="topContent.html" name="topFrame">
<frame src="bottomContent.html" name="bottomFrame">
</frameset>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.
Control scrolling, resizing, and the document loaded in each pane with frame attributes.
<frame src="content.html" name="mainFrame" scrolling="auto" noresize>Frames could load external URLs in a pane. The same idea today uses iframe inside a normal page.
<!-- Historical (obsolete) -->
<frame src="https://example.com" name="externalFrame">
<!-- Modern replacement -->
<iframe src="https://example.com" title="Example site"></iframe>Use CSS grid with iframe elements to achieve split layouts in valid HTML5.
<div class="split-layout">
<iframe src="sidebar.html" title="Sidebar"></iframe>
<iframe src="content.html" title="Main content"></iframe>
</div>Replace frameset splits with CSS grid and iframe panes:
grid Split columns/rowsiframe Embed each panetitle Accessibility labelsandbox Restrict embedded content/* 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
Frames were removed partly due to accessibility failures:
title on iframe elements.frameset split the window into columns or rows.
src pointed to a separate HTML page per pane.
iframe and CSS layouts solved the same problems without breaking UX.
Learn frame for history. Build with iframe and grid in all new projects.
<frame> and <frameset> are obsolete and not supported in HTML5 documents. Modern browsers will not render frameset layouts.
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.
Use these HTML5 approaches instead of frame and frameset.
Bottom line: Do not use <frame> in new projects. Use <iframe> and CSS for modern split layouts and embedded content.
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.
iframe for inline embedded contenttitle on every iframeframe or frameset in new projects<frame>Bookmark these before you ship — they’ll keep you on modern HTML standards.
<frame> is removed from HTML5.
Frame was always inside frameset.
StructureModern inline embed replacement.
ReplacementGrid/flexbox replaces window splits.
ModernFrames broke navigation and SEO.
AccessibilityModern browsers skip framesets.
Compatibilityframe and frameset are obsolete and removed from the HTML5 specification.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.iframe and CSS layout. Study frame only to read legacy HTML.Replace obsolete frames with iframe and CSS grid in the interactive HTML editor.
6 people found this page helpful