Skip to main content
HTML Validation

The “name” attribute is never allowed on the “frame” element.

About This HTML Issue

The validator warns about name on a <frame> because the <frame> element itself is obsolete, and the warning goes away when the frame becomes an <iframe>, which accepts name.

In a frameset, name gives a frame the target name that other documents use to load pages into it. A link with target="content" opens its page in the frame named content, a form with the same target shows its response there, and a script can reach the frame through window.frames["content"]. Menus built with frames depend on it: every link in the menu frame points at the frame that holds the content. Browsers still honor these names, which is why the frames keep working.

The validator checks name on every element against a short list of elements that define it: button, details, fieldset, form, iframe, input, map, meta, object, output, select, slot and textarea. <frame> isn't on that list because it's obsolete. The validator reports this check as an informational message rather than an error, so it shows up as a warning, once for each named frame. The errors come from the elements themselves: each <frame> gets a message saying it's obsolete, and so does the <frameset> around it. Other attributes common on old frames, such as frameborder, scrolling and noresize, get no message on a <frame>.

Deleting name silences the warning but breaks every link and form that targets the frame, and the obsolete errors stay. Replace the frameset instead. A frame whose content moves into the page itself, such as a menu, no longer needs a name, since nothing loads into it. A frame that becomes an <iframe> keeps its name, so links with a matching target keep loading into it.

Invalid example

The links in menu.html use target="content" to open each recipe in the second frame:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Recipe box</title>
  </head>
  <frameset cols="200,*">
    <frame src="menu.html" name="menu">
    <frame src="welcome.html" name="content">
  </frameset>
</html>

Valid example

The menu moves into the page, and the iframe keeps the name content, so the links still load into it:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Recipe box</title>
  </head>
  <body>
    <nav>
      <a href="soups.html" target="content">Soups</a>
      <a href="desserts.html" target="content">Desserts</a>
    </nav>
    <iframe src="welcome.html" name="content" title="Recipe"></iframe>
  </body>
</html>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries