What are frames in HTML?
In HTML, frames were an older way of dividing a browser window into multiple separate sections, with each section loading a different HTML document. This allowed one part of the screen to stay fixed, such as a navigation menu or header, while another part changed as the user browsed different pages. Frames were commonly created using the <frameset> and <frame> elements.
A typical use of frames was to keep site navigation visible at all times while loading content in a separate panel. For example, a website might display a static menu on the left-hand side and open articles or product pages in a larger frame on the right. At the time, this seemed like a convenient way to create reusable layouts and reduce repetition across pages.
However, frames created a number of usability and technical problems. They often made pages difficult to bookmark or share because the URL did not always reflect the content being shown inside an individual frame. Frames could also cause issues with browser history, printing, accessibility, and search engine crawling. Because of these limitations, frames and framesets are now considered outdated and are no longer supported in modern HTML standards.
Examples of frames in HTML
A simple historical example of frames is a website with two columns: a left-hand frame containing navigation links and a right-hand frame displaying the selected content. When a user clicked a link in the menu, only the content frame changed, while the navigation frame stayed in place.
Another example was a top banner frame that stayed fixed while the main page content loaded below it. Some older websites used this approach to keep branding, contact details, or promotional messages visible while users moved through the site.
Frames were also sometimes used in internal systems or documentation portals where teams wanted to keep menus, indexes, or support links permanently visible. While this worked in a basic sense, it usually created a clumsy user experience compared with modern layout methods.
Why frames became outdated
Frames became outdated because they introduced more problems than they solved. One major issue was usability: users could land on a page without the correct surrounding navigation, or they might not be able to bookmark the exact view they wanted to return to. Back-button behaviour could also be confusing because browser history did not always work as expected inside framed layouts.
Frames were also poor for accessibility. Screen readers and assistive technologies often struggled to interpret framed content clearly, which made websites harder to use for people relying on accessible browsing tools. In addition, search engines could have difficulty understanding and indexing content properly when it was split across multiple frames.
From a design and development perspective, frames also became less practical as web standards improved. Modern CSS, responsive layouts, reusable templates, and JavaScript frameworks made it possible to build flexible page structures without relying on separate framed documents.
Modern alternatives to HTML frames
Modern websites no longer use framesets for layout. Instead, developers use HTML and CSS to create shared page structures with headers, navigation, sidebars, and content areas that behave consistently across the site. This approach is more accessible, more search-engine friendly, and much easier to maintain.
A common modern alternative is to use reusable layout components, such as a fixed header, sticky sidebar, or responsive navigation menu. These patterns provide the same practical benefit that frames once aimed to achieve—keeping important interface elements visible—without the technical problems that frames introduced.
Templates, content management systems, and modern front-end frameworks also make it much easier to reuse common page elements across multiple pages. Instead of loading separate HTML documents into different parts of the browser window, websites now build a single structured page that adapts cleanly across devices and supports proper URLs, accessibility, and SEO.
Frames in HTML and SEO
Frames are considered poor practice for SEO because they can make content harder for search engines to understand and index. In older framed sites, search engines could sometimes index the content of an individual frame without the full page structure around it, which created a disconnected experience for users arriving from search results.
Frames also made it harder to create clear, shareable URLs and often weakened the overall structure of a website. For modern SEO, it is much better to use standard HTML layouts that give each page a unique URL, clear metadata, accessible navigation, and content that can be crawled and interpreted properly.
For this reason, frames are now viewed mainly as part of the history of web development rather than a recommended technique for building modern websites.
