# The “noframes” element is obsolete. Use the “iframe” element and CSS instead, or use server-side includes.

> Canonical HTML version: https://rocketvalidator.com/html-validation/the-noframes-element-is-obsolete-use-the-iframe-element-and-css-instead-or-use-server-side-includes
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `<noframes>` element is obsolete, so remove it and move any content worth keeping into the page's `<body>` as regular markup.

`<noframes>` held fallback content for browsers that couldn't display a `<frameset>`. Every browser in use today displays frames, and the rendering rules in the HTML standard hide `<noframes>` with `display: none` wherever it appears, so visitors never see what's inside it. The parser also reads its contents as raw text, the same way it reads a `<style>` element, so the validator doesn't check the markup inside it either.

The validator reports `<noframes>` wherever it sits: inside a `<frameset>`, after the closing `</frameset>`, in the `<head>` or in a regular `<body>`. In the `<head>` and after `</frameset>` it also adds an error saying the element isn't allowed there, and that error goes away with this one.

What to do depends on the page around it. In a frameset document, `<noframes>` goes away together with the `<frameset>` and its `<frame>` elements, which get obsolete messages of their own. The fallback often already holds a frameless version of the page, such as links to the documents the frames loaded, and that content can become the start of the new `<body>`. When `<noframes>` is left over in a page that already has a `<body>`, usually copied from an old template, delete it. Nothing inside it was ever displayed, so the page looks the same without it.

Don't move the fallback into an `<iframe>` instead. An iframe has to stay empty, and the validator reports any content placed inside it.

## Invalid example

A two-frame page with a fallback for browsers without frame support:

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Club newsletter</title>
  </head>
  <frameset cols="25%,75%">
    <frame src="issues.html">
    <frame src="latest.html">
    <noframes>
      <body>
        <p>This site uses frames. Read the <a href="latest.html">latest issue</a> or browse the <a href="issues.html">past issues</a>.</p>
      </body>
    </noframes>
  </frameset>
</html>
```

## Valid example

The frameset becomes a `<body>`, the links from the fallback become the page's navigation, and an `<iframe>` loads the issue the second frame used to show:

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Club newsletter</title>
  </head>
  <body>
    <nav>
      <a href="latest.html" target="issue">Latest issue</a>
      <a href="issues.html" target="issue">Past issues</a>
    </nav>
    <iframe src="latest.html" name="issue" title="Newsletter issue"></iframe>
  </body>
</html>
```
