HTML-Lesson 7-Frames

Frames are a very useful way of laying out your website. They split oyu page into two seperate pages so that you can easily display a navigation bar and a content on the same page. Frames also mean that every time you go to a seperate page you dont have to reload the navbar, only the content.

To make a page with frames you need several different pages, each one having a specific job. One is the navbar, one is the content and one is a page defining the frames.

So Now you make three pages. All with the basic html page tags that you learned in lesson two. Name them index.html, menu.html and page1.html.

Now on your Index page you write

<frameset cols="25%,*">
		
	<frame src="menu.html" name="menu">
	<frame src="page1.html" name="main">

</frameset>

That describes the frames and where on the page they are and id's them. It also says which page starts in which frame.

Now all you have to do is make the menu page and the page1 page like normal pages and watch them be displayed in their assigned frames. So now you have two frames and three pages all you need to do is link your frames up to the rest of your websites content.

To do this you need to define a target for the links in your menu frame so they load in the main frame. To do this make your links like this.

<a href="page1.html" target="main">

page 1

</a>

Please note that it is essesenal to id the frames correctly otherwise your page will not work

Lesson 6-images

Lesson 8-Forms