Syntax | <noframes>...</noframes> |
---|---|
Attribute Specifications | |
Contents |
|
Contained in | applet, blockquote, body, button, center, dd, del, div, fieldset, form, frameset, iframe, ins, li, map, noscript, object, td, th |
The noframes element contains content that should only be rendered when frames are not displayed. noframes is typically used in a Frameset document to provide alternate content for browsers that do not support frames or have frames disabled.
When used within a frameset, noframes must contain a body element. There must not be any noframes elements contained within this body element.
A meaningful noframes element should always be provided in a Frameset document and should at the very least contain links to the main frame or frames. noframes should not contain a message telling the user to upgrade his or her browser. Some browsers support frames but allow the user to disable them.
Various methods of automatically creating non-frames content exist. See Frames design guidelines: automatic no-frames content for more details.
An example follows:
<frameset rows="*,100">
<frameset cols="40%,*">
<frame name="Menu" src="nav.html" title="Menu" />
<frame name="Content" src="main.html" title="Content" />
</frameset>
<frame name="Ad" src="ad.html" title="Advertisement" />
<noframes>
<body>
<h1>Table of Contents</h1>
<ul>
<li>
<a href="reference/html40/">HTML 4.0 Reference</a>
</li>
<li>
<a href="reference/wilbur/">HTML 3.2 Reference</a>
</li>
<li>
<a href="reference/css/">CSS Guide</a>
</li>
</ul>
<p>
<img src="ad.gif" alt="Ad: Does your bank charge too much?" />
</p>
</body>
</noframes>
</frameset>
In XHTML 1.0 Transitional, the noframes element is also permitted within most block-level elements. This allows authors to include content, such as navigation aids, that should only be displayed if the document is not being viewed within a frameset. Such use helps to ensure that a frame could stand on its own if bookmarked or accessed through a search engine while not burdening the frames user with duplicate content. However, most browsers do not support this use of noframes and will always display the content.