HTML Frames Tutorials | Learn HTML Frames

HTML Tutorials | Bookmark | HTML Tutorial Program by Email | Contact | Link Us | Links | Advertise With Us | Sitemap |
HTML Lessons
Main
:: Home Page
:: Tools
:: Glossary
:: First Steps

Tutorials
:: Basic HTML

Elements
:: Text
:: Dividers
:: Links
:: Graphics
:: Lists
:: Tables
:: Frames

Tips
:: Graphics
:: Frames/Tables

Extra
:: Links
:: Web Tools
:: Web Hosting
:: Domains

Frames are a good way to organize content and provide your visitors with a list of links or table of content that is always at the users fingertips.

To start understanding how frames work, you should first take a look at a page that uses frames. Chances are that if this is not your first time using the internet, you've encountered dozens of frame-sites. If you haven't (and even if you have) click here to see an example of such a page.


frame diagram


The example you've seen looks a little like the diagram above.

A frame page actually consists of a html file with the frame code inside, that calls up other html files and displays them in one window. This way you have three different html files on screen, top.html, menu.html and main.html. They are called up in the index.html.

The following is the HTML code of the index.html file (the red code is the actual frame code):


<html><head><title>FRAME EXAMPLE</title></head>

<frameset cols="30%,70%">
  <frameset rows="30%,70%">
    <frame src="frame1.html" name="frame1">
    <frame src="frame2.html" name="frame2">
  </frameset>
  <frame src="frame3.html" name="frame3">
</frameset>

<body></body></html>


As you can see, the index.html calls up frame1.html, frame2.html and frame3.html which are normal html files with text and links.

FRAMESET COLS refers to the columns (vertical divison) of the layout which in our case is divided into two columns, one that makes up 30% of the maximum width, the second 70%. You can have as many columns as you like, but it's best to keep it as simple as possible.

FRAMESET ROWS refers to the rows (horizontal division) of the layout, in our example 30%,70%. This is not a required attribute and you can leave it out if you do not wish to divide a column into more rows. If you do not use ROWS you can specify the FRAME SRC right away.

FRAME SRC specifies the html file that will be displayed in the specific row/column. The source files are ordinary HTML files, with their own HTML, HEAD and BODY tags.

THE MENU: To make links from one frame open a page in a different frame you must include a TARGET attribute in your A HREF link tag. The TARGET will specify the name of the frame that is the target of the link. For example, if you wish a link from menu.html to open in main.html you would use the following tag:

<a href="link.html" target="MAIN">Link</a>.

For this to work you must name your frames with the NAME attribute (see the example above).

Featured Screensaver
Living Aquarium
Enjoy the calm serenity of our new Living Marine Aquarium Screensaver. Watch as the beautiful tropical fish swim realistically around a beautiful aquarium! Free for everybody!
Link To Us
Link To Us
Network Channels
Screensavers
21,000+ free screensavers for every occasion. Updated Daily!
Get The Klip

Get The Klip

Desktop Themes
35,000+ free desktop themes. Updated Daily!
Get The Klip

Get The Klip

Desktop Wallpaper
60,000+ free desktop wallpapers - Updated Daily!

Funny Videos
Free Funny Videos & Pictures from across the Web.

Online Games
Play a variety of free online games. Fun for everybody!

Cheat Codes
Free cheat codes for XBox, PlayStation, Nintendo!

Song Lyrics
Free song lyrics database. 150,000+ song lyrics.

Free Stuff
1000's of great freebies for your website and you. Updated Daily!

Greeting Cards
Send free digital postcards to your friends and family.

Win Money
Win cash prizes, free for everyone to enter.

HTML Tutorials
Learn how to build your own web site with our free html tutorials and webmaster resources.

Winamp Skins
20,000+ of the best Winamp, ICQ, Hotbar, & Yahoo Messenger skins! Updated Daily!

TheFreeSite

TOP LINKS
Free Javascripts
Computer Software
Free Clipart
Freebies
Free Backgrounds
Web Hosting Directory

© 2008 AAAHtml.com - Privacy Policy
Hosted by HostDeparment
HTML Frames