HTML Lesson 5
Ask Maggy Mae is created using frames. Frames divides the browser into
several web pages. On Ask Maggy Mae there are 3 pages displayed each time
you click. When you enter the site you have the logo on the top, which is
one page; the navbar on the left side, which is a second page; and the
front page on the right which will change each time you click on a link on
Using frames makes it much easier to add pages to Ask Maggy Mae. At the
moment there are 122 pages on the site. I chose to use frames to make my
work much simpler. My considerations were, changing the logo, the
constantly adding new pages which could end up costing me many hours of
senseless programming to change the navigation menu on each page every
time I added or even deleted a page from the site. I did consider doing
away with frames because the navbar I use is created in such a manner that
enabled browsers and use the backup navbar I've included in my site.
There really isn't a lot of work to creating a frames page, but it is
very important to make sure the links within the frames are created
Tags & Attributes
The basic tags and attributes you will need to know in order to use
frames are as follows.
||<FRAMESET> tag establishes frames within
the HTML document, it will end with the </FRAMESET> tag.
||will set the size for rows in either
pixels, percentage or "*" can be used to signify remaining space.
||will set the size for columns in either
pixels, percentage or "*" can be used to signify remaining space
||This tag is used to identify the frame's
characteristics and load the initial content.
|| identifies the page that will be loaded
into the frame
||this will label a frame so it can be
referred to from other frames or windows.
||sets a section of the HTML document that
will be visible to a browser that does not support frames. Basically
it will tell the person that the page is a frames page and their
browser does not support it.
Below you will see the basic HTML code for a frames page that is
set up with a the frames in rows. You can also set the frames so they are
in columns with the COLS attribute.
<TITLE>Sample Frames Page</TITLE>
<FRAME NAME="header" SRC="url for top frame">
<FRAME NAME="main" SRC="url for bottom frame">
You can add formatting to your basic frames page to create a design
that suits you. The attributes listed below should only be used within the
||allows you to set the border around the frame or
||stops visitors from being able to resize the frame
||allows or stops the visitor from scrolling the frame,
the values are Yes or No and Auto
||sets the margin height (in pixels) above and below the
content within the frame
||sets the margin width (in pixels) before and after the
content within the frame
||sets the color of the frame border (if you have chosen
to have a border)
The HTML code below is the code used to create the frames page for
this sample created originally for the MSN
Tutorial on adding music to your site using frames. My pages have been
created with FrontPage so I removed the Meta Tag lines to show just the
frames coding. This sample shows all of the attributes except FRAMEBORDER
<title>Ask Maggy Mae</title>
<frame name="header" scrolling="no" noresize target="main" src="musicpage.htm"
<frame name="main" src="AMMQuilt.htm">
<p>This page uses frames, but your browser doesn't support them.</p>
There are two ways to set your navigation of your frames page. Either
your visitors can click in one frame and the result of that click will
appear in another frame, or your visitors can click in one frame and the
result of that click will appear in the same frame. I have used both these
options when I created the frames page for Ask Maggy Mae. When going from
one navbar to the other the click navigates the visitor within the same
visitor clicks on any of the links in the navbar other than switching
navbars the click will result in a page opening in the frame beside the
navbar. The top frame holding the Ask Maggy Mae logo never changes. This
is where the use of TARGET="?" comes in. You will use the TARGET attribute
to instruct the browser in which frame the click will open in.
Copyright © 2001-2005 Margaret Walker