|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 HTML 4.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.