|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
In this example, the display is first divided into three rows: The top and bottom rows are narrow (10% of the available height) and contain nonscrolling documents, while the middle row takes up the remaining 80% of the window height. The middle row is further divided by the second FRAMESET into two columns: The first takes up 20% of the window width, the second taking up the remaining 80%. Both these frames are scrollable, and are named using NAME attributes. The following is an example of incorrectly defined FRAMEs (comments in italics) <FRAMESET ROWS=10%, 80%, 10%> 3 rows, narrow top and bottom <FRAME SCROLLING=no SRC=logo+buttonbar.html> 1st frame <FRAMESET COLS="20%, 80%"> 2nd frame is a FRAMESET <FRAME NAME="navigation" SRC="navigate.html"> containing 2 frames <FRAME NAME="main" SRC="main/start.html"> </FRAMESET> <FRAME SCROLLING="no" SRC="credits.html"> 3rd frame <FRAME SRC="oops.html"> ERROR -- FRAMESET declares 3 rows, but this is the fourth FRAME!! </FRAMESET> The TITLE attribute should contain a TITLE for the frame, for use by non-visual (e.g., text-to-speech) browsers. The attributes CLASS, ID, and STYLE are also allowed. None of these attributes are supported by current browsers. Note that event-handling attributes are not allowed (however, Internet Explorer 4 does support onBlur, onFocus, onLoad, and onUnload). In general, event handling for a specific frame should be implemented within the document loaded into the frame. The next sections describe the remaining attributes, and their meanings.
NOFRAMES Element: Markup for FRAME-Incapable Browsers
NOFRAMES contains HTML markup to be displayed by browsers that do not understand the FRAMESET and FRAME elements. NOFRAMES content is not displayed by a FRAME-capable browser. A FRAME-incapable browser, however, ignores the FRAMESET, FRAME, and NOFRAMES elements and displays the NOFRAMES content as if it were the BODY of a regular HTML document. NOFRAMES was initially introduced to delimit, within a frameset document, markup alternative to the FRAMESET for frame-incapable browsers. In this model, the NOFRAMES element must appear after the last FRAMESET and should contain a BODY element and regular BODY content. The following is an example: <HTML> <HEAD> <TITLE>Test of the NOFRAMES Element</TITLE> </HEAD> <FRAMESET ROWS=50%, 50%> <FRAME SRC=top_part.html NAME=wind1> <FRAME SRC=bot_part.html NAME=wind2> </FRAMESET> <NOFRAMES> <BODY BACKGROUND=greywhale.gif> <H1 ALIGN=center> Warning! </H1> <P ALIGN=center><EM>If you are reading this text, you are viewing this document with a FRAMEs-incapable browser--this document was designed to be viewed by a FRAME-capable browser, such as Netscape Navigator 2.0. If you do not have such a browser, please access the alternative <A HREF=noframes.html>noframes</A> collection. </BODY> </NOFRAMES> </HTML> HTML 4 also allows NOFRAMES content within the BODY of nonframed documents. This, in principle, allows for regular documents to display certain blocks of markup only when loaded by browsers incapable of displaying frames. Thus, the individual documents loaded into each frame of a framed page can contain markup that is hidden when the document is presented in a framed view. Unfortunately, only Internet Explorer 4 supports NOFRAMES elements within the body of a documentNetscape Navigator does not understand NOFRAMES in this way and always displays NOFRAMES content when the element appears inside the body of a regular document.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |