|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
Frame TagsFramed layouts are ones in which the browser window is broken into multiple regions called frames. Each frame can contain a distinct HTML document, enabling you to display several documents at once, rather than just one (see Figure 3.19).
You need to know only a few tags to set up a framed page. These tags are covered in this section. See Frames, p. 211. <FRAMESET> Type: Container Function: Divides the browser window into frames. Syntax: <FRAMESET ROWS=list_of_row_sizes COLS=list_of_column_sizes> ... </FRAMESET> Attributes: <FRAMESET> can take the ROWS or COLS attribute, but not both at the same time. ROWS specifies how the browser screen should be broken up into multiple rows. ROWS is set equal to a list of values that describe the size of each row. The number of items in the list determines how many rows there will be. The values in the list determine the size of each row. Sizes can be in pixels, percentages of screen depth, or relative to the amount of available space. COLS works the same way, except it will divide the screen into columns.
Example: <!-- Divide the screen into four rows: 125 pixels, 30% of screen, 88 pixels, and whatever is left over. --> <FRAMESET ROWS=125,30%,88,*> ... </FRAMESET> Related Tags: <FRAMESET> only breaks up the screen into multiple regions. You need to use the <FRAME> tag to populate each frame with content. Also, you can use the <NOFRAMES> tag to specify alternative content for browsers that cannot process frames.
<FRAME> Type: Standalone Function: Places content into a frame. Syntax: <FRAME SRC=URL_of_document NAME=frame_name FRAMEBORDER=0|1" MARGINWIDTH=width_in_pixels MARGINHEIGHT=height_in_pixels NORESIZE SCROLLING=YES|NO|AUTO LONGDESC=URL_of_description> Attributes: The <FRAME> tag can take several attributes:
Example: <FRAMESET COLS=25%,75%> <!-- Make 2 columnar frames --> <!-- Populate frame #1 --> <FRAME SRC=leftframe.html NORESIZE NAME=left FRAMEBORDER=0> <!-- Populate frame #2 --> <FRAME SRC=rightframe.html NORESIZE NAME=right FRAMEBORDER=0> ... </FRAMESET> Related Tags: The <FRAME> tag is valid only between the <FRAMESET> and </FRAMESET> tags. <NOFRAMES> Type: Container Function: Provides an alternative layout for browsers that cannot process frames. Syntax: <NOFRAMES> ... non-frames content goes here ... </NOFRAMES> Attributes: None. Example: <FRAMESET COLS=25%,75%> <!-- Make 2 columnar frames --> <!-- Populate frame #1 --> <FRAME SRC=leftframe.html NORESIZE NAME=left FRAMEBORDER=0> <!-- Populate frame #2 --> <FRAME SRC=rightframe.html NORESIZE NAME=right FRAMEBORDER=0> <NOFRAMES> Your browser cannot process frames. Please visit the <A HREF=/noframes/index.html>non-frames version</A> of our site. </NOFRAMES> </FRAMESET> Related Tags: <NOFRAMES> is valid only between the <FRAMESET> and </FRAMESET> tags. Your <NOFRAMES> content should be specified before any nested <FRAMESET> tags. <IFRAME> Type: Container Function: Places a floating frame on a page. Floating frames are best described as frames that you can place like images. Syntax: <IFRAME SRC=URL_of_document NAME=frame_name FRAMEBORDER=0|1" WIDTH=frame_width_in_pixels_or_percentage HEIGHT=frame_height_in_pixels_or_percentage MARGINWIDTH=margin_width_in_pixels MARGINHEIGHT=margin_height_in_pixels SCROLLING=YES|NO|AUTO ALIGN=TOP|MIDDLE|BOTTOM|LEFT|RIGHT LONGDESC=URL_of_description> ... text or image alternative to the floating frame ... </IFRAME>
|
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. |