**`<frame>`** only made sense nested inside a `<frameset>` (which replaced the normal `<body>` entirely) — each `<frame>` loaded its own separate HTML document into one section of a grid layout, letting a navigation menu stay fixed in one frame while content changed in another, all without a full page reload. This entire approach was removed from HTML5 due to serious, well-documented problems: broken browser back/forward behavior, un-bookmarkable URLs (the address bar showed the frameset's URL, not the actual visible content), poor accessibility, and bad SEO (search engines struggled to index frame-based content coherently). Modern layouts achieve the same visual effect with CSS layout (flexbox/grid) and `<iframe>` only for genuinely separate embedded documents.
1Understanding <frame>
`<frame>` only made sense nested inside a <frameset> (which replaced the normal <body> entirely) — each <frame> loaded its own separate HTML document into one section of a grid layout, letting a navigation menu stay fixed in one frame while content changed in another, all without a full page reload. This entire approach was removed from HTML5 due to serious, well-documented problems: broken browser back/forward behavior, un-bookmarkable URLs (the address bar showed the frameset's URL, not the actual visible content), poor accessibility, and bad SEO (search engines struggled to index frame-based content coherently). Modern layouts achieve the same visual effect with CSS layout (flexbox/grid) and <iframe> only for genuinely separate embedded documents.
If you ever need to maintain an ancient frameset-based site, know that <frame>/<frameset> render blank in every current browser — there's no legacy compatibility mode left to fall back on.
<!-- Historical frameset layout — non-functional in any modern browser -->
<frameset rows="20%,80%">
<frame src="header.html">
<frame src="main.html">
</frameset>2Practical Example
Here is a real-world application of <frame> showing how it is used in production HTML.
3Best Practices
Follow these guidelines when working with <frame>:
1. Never use <frame>/<frameset> — completely unsupported by every modern browser
2. Use CSS Grid or Flexbox for multi-panel page layouts instead
3. Use a single <iframe> only for the rare case of embedding one genuinely separate external document, not for overall page structure
Tip: If you ever need to maintain an ancient frameset-based site, know that <frame>/<frameset> render blank in every current browser — there's no legacy compatibility mode left to fall back on.
<!-- Historical frameset layout — non-functional in any modern browser -->
<frameset rows="20%,80%">
<frame src="header.html">
<frame src="main.html">
</frameset>