|
A frameset specifies the layout for frames,
including the locations and characteristics of the frames.
The frameset acts as a holder for frame information.
|
|
The <FRAMESET> Tag |
|
|
The <FRAME> Tag |
|
|
The <NOFRAME> Tags |
The first thing to do when creating a frame
based Web site is to layout how you want the browser window
divided into frames. The frame definition document is the
page that contains the layout of each frame and the names
of the HTML documents that will fill the frame.
Frame based page can be created by using
the <FRAMESET> tag.
Syntax:
<HTML>
<HEAD>
<TITLE>
.</TITLE>
</HEAD>
<FRAMESET>
.</FRAMESET>
</HTML>
Note: No <BODY>
and </BODY> tags are used
in code that defines frames. The <FRAMESET>
and </FRAMESET> tags form
a special kind of body of code and will not work if surrounded
by <BODY> and </BODY> tags.
In this Exercise, you will learn to create Layout Grid using Framesets
Use the <FRAMESET> and </FRAMESET>
tag to insert rows/cols attributes. Insert <FRAME src>
statement to specify the URL of each page. Save the above
HTML document as Layoutgrid.htm.
Type the above HTML code and save as test.htm.
Here is the Layout grid created using the Framesets
The <FRAME>
tag is necessary for the <FRAMESET>
tag to accomplish anything
After you have your basic frameset laid out, you need to associate
an HTML document with each frame. To do so, you use the <FRAME>
tag. When you are creating frame definition documents, you
might find it helpful to include the <FRAME>
tags, which are separated from the <FRAMESET>
tags in your HTML document. Doing so has no effect on the
appearance of the resulting Web pages but does tend to make
the HTML source easier to read.
Syntax:
<FRAMESET ROWS="*,*,*">
<FRAME SRC="document1.html">
<FRAME SRC="document2.html">
<FRAME SRC="document3.html">
</FRAMESET>
Additional Attributes:
You can assign a few extra attributes to
a <FRAME> tag to give you
additional control over how the user interacts with your frames, like
SCROLLING
NO RESIZE
MARGINHEIGHT
MARGINWIDTH
If you load a frame definition document
into a Web browser that does not support frames, you get only
a blank page. To get around this problem, Netscape created
a special tag block called <NOFRAME>.
This tag enables you to include body text as part of the document.
Syntax:
<HTML>
<HEAD>
<TITLE>Page Title</TITLE>
</HEAD> <FRAMESET>
your frame definition goes here
<NOFRAME>
Include any text, hyperlinks, and tags
you want here.
</NOFRAME> </HTML>
Note: None of
the text you have included inside the <NOFRAME>
block will display by the browsers that support frames, but
when the page is loaded into a Web browser that does not support frames, it will be displayed.
Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.
|
|