iTech College - Internet Technology, Online Education, E-Learning, Technician Training, Tech Tutorials, Distance Education, Virtual Learning HTML Course: Frame - www.itechcollege.com HTML Course: Frame - www.itechcollege.com
Free Courses
HTML
JavaScript
CSS
ASP
PHP
JSP
C++
ASP.NET
SQL
AJAX
FTP
XML

courses > HTML > Frame

Frame

With frames, you can put a number of HTML pages into a single window, each of frame can display a page. frames start and end with the <FRAMESET></FRAMSET> tags. The <FRAMESET> tag can have two modifiers: ROWS and COLS to define how big the frames will be. For example:

<html>
<head><title></title></head>  
<frameset rows="64,*">
<frame name="banner" scrolling="no" noresize 
         target="contents" src="top.htm">  
<frameset cols="150,*">
<frame name="contents" target="main" 
         src="menu.htm">
<frame name="main" src="home.htm">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't 
support them.</p>
</body>
</noframes>
</frameset> 
</html>

Let's explain each element:

rows="64,*" means that the the first frame will take up 64 rows of the window and the second frame will take up the rest. An asterisk means that the row will take up whatever space is left. You can use percentage to replace length. For example: cols="30%,60%"

<frame> defines each individual frame.

name="..." gives the frame a name.

src="..." tells which page will be loaded in the frame.

target="..." allows you to make links appear in specific frames or windows.

scrolling="yes|no|auto" allows you to control the scroll bars on the frame. "yes" forces the frame to always have scroll bars. "no" forces the frame to never have scroll bars. "auto" allows the browser to decide if scroll bars are necessary. The default value is "auto".

noresize allows you to keep the frame from being resizable by the viewer.

</noframes> is used to create a frameless alternate. When the page is viewed by a browser that does not support frames, everything EXCEPT what is between the </noframes> tags is ignored.

There are also some "magic" TARGETs.
"_blank" will always open the link in a new window.
"_top" will open the link in the whole page, instead of in a single frame.
"_self" makes the link open in the frame it's called from. This is useful when the <BASE...> tag is used.
"_parent" opens the link in the immediate frameset parent of the frame the link is called from.

Example:

     <A HREF="ah.html" TARGET="_blank">text</A>

And, TARGET can also be added to the <FORM> tag to make the output from the script got to the specified frame or window.



  Back to Index Page
 Next Page:  

Basic Tags
Character Paragraph and Position
Character Style
Lists
Links
Image
Color
Table
Form
Frame


Online Education, Online Training for Your Job, Distance Education, E-learning Programs for Your Career!Online Colleges, Online Universities, E-learning & Distance Education for Your Career! Easy Job Training & Online Courses.


   Email A Friend  
 
Earn Online Degree
for Your Job
I found a job after I earned an online degree!
Online classes for finding a Job. Online College, Online University, Degrees, E-learning school, online certificate Earn your
online degree now!
Online Training
for Good Job
Why I work so hard but earn so little? Why I cannot find a high paying job?
Online training for a Good Jobs. Online Degree, E-learning school, online certificate Go to
online school now!

Copyright ©2024, itechcollege.com. All rights reserved
iTechCollege | About iTech | Contact iTech