| Tags: < frame >
What are frame pages ?
Frame pages are HTML pages which are used to display more than one page on the same page. This page you are viewing is a frame page. The top portion is one page, the left side with the menu is another and this part you are reading is the third page. The actual frame page code only needs some code before the body tag to display multiple pages. This code contains some information on how to display the pages within the frame page and links as to where the pages to be loaded are.
Why use frame pages ?
Frame pages have several uses but the most common is to save the viewer from reloading identical items as they go from page to page on your site. For example the frame to the left contains the menu which saves time by not having to be loaded every time a page changes. For the header frame on the top I created pages which automatically change while not affecting the rest of the page.
Could frame pages have contents in their body tags?
Yes and they should. Not all browsers have the ability to view frames so they will only see the body of your frame page. This page should contain a link to an alternate page which does not use frames or a Sorry but your Browser does not support Frame Pages statement. It is also a good place to put some site description text. Search Engines some times use the first few lines of text in the body. This text would only be seen by the Search Engines and the very few not using Browsers which support frames.
Sample of a frame page:
< html>
< head>
< title>< /title>
< /head>
< frameset rows="100,100%" border=0> See note 1
< frame src="A.html" name="A"scrolling=no> See note 2
< frameset cols="200,100%" border=0> See note 3
< frame src="B.html" name="B" scrolling=auto> See note 4
< frame src="C.html" name="C" scrolling=yes> See note 5
< /frameset>
< NOFRAMES>
< BODY onload="top.window.focus()"> See note 6
Text description of the site or page bla bla...
< P>Sorry but your browser does not support Frame pages.
< form>
< input type="button" value="Close" onClick='self.close()'>
< /form>
< /NOFRAMES>
< /body>
< /html>
|
*Notes
- 100 means 100 pixels high, 100% means 100% window width
- A.html - Place the url of the page you want to open in this frame.
- 200 means 200 pixels wide, 100% means 100% window height,
for column on left of page. The column on the right fills the rest.
- B.html - Place the url of the page you want to open in this frame.
- C.html - Place the url of the page you want to open in this frame.
- Add the onload info to your body tag.
- Scrolling= Scroll bars in frame options: yes, no, auto
- name= the name of your Frame.
- border= border width options= 0 to ~
- Items between the noframes tags are not displayed in a frame capable browser.
|
The above Script will produce a page like this if viewed with:
| a frame capable Browser. |
a Browser incapable of viewing frames.
Text description of the site or page bla bla...
Sorry but your browser does not support Frame pages.
|
|
Some samples and scripts to generate frames.
|
< frameset cols="15%,70%,15%">
< frame name="A" src="a.html" scrolling="auto">
< frame name="B" src="b.html" scrolling="auto">
< frame name="C" src="c.html" scrolling="auto">
< /frameset>
|
|
< frameset rows="33%,33%,33%">
< frame name="A" src="a.html"scrolling="no">
< frame name="B" src="b.html"scrolling="yes">
< frame name="C" src="c.html"scrolling="auto">
< /frameset>
|
|
< frameset cols="20%,60%,20%">
< frame name="A" src="a.html"scrolling="no">
< frame name="B" src="b.html"scrolling="no">
< frame name="C" src="c.html"scrolling="auto">
< /frameset>
Document b.html should contain the following code:
< frameset rows="50%,50%">
< frame name="D" src="d.html">
< frame name="E" src="e.html">
< /frameset>
|
Some extra parameters to use with frame tags.
- marginheight="" .... enter 0 to ~
- marginwidth="" ..... enter 0 to ~
- longdesc="" ........ description of page
- noresize ........... frame is not resizable
Learn about lists.
Click here → List ←

|