Login    New User    Forgot Password    Help      

HTML Frames

GO TO INDEX

HTML Frames

Frames allow for multiple ".html" documents to be displayed inside of one browser window at a time. This means that one page has no content on it, but rather tells the browser which web pages you would like to open



<html>  
<head>  
</head>  
<frameset cols="30%,*">  
<frame src="menu.html">  
<frame src="content.html">  
</frameset>  
</html>

Frame Set:

Here's the example: Frame Index
  • frameset - The parent tag that defines the characteristics of this frames page. Individual frames are defined inside it.
  • frameset cols="#%, *"- Cols(columns) defines the width that each frame will have. In the above example we chose the menu (the 1st column) to be 30% of the total page and used a "*", which means the content (the 2nd column) will use the remaining width for itself.
  • frame src="" -The location of the web page to load into the frame.

A good rule of thumb is to call the page which contains this frame information "index.html" because that is typically a site's main page.

GO TO INDEX