Inline Frames Tutorial

Tutorial

  1. Create a file named "index.htm".
  2. Put your layout code on the index.htm file. Do not put the content on index.htm - the content goes inside the frame.
  3. Put the below code on index.htm after the <head> tag.
    <base target="frame">
  4. Put the below code on index.htm where you want the frame to appear.
    <iframe name="frame" src="index2.htm" height="300" width="500" frameborder="0">
        Your browser does not support frames.
    </iframe>
  5. Create a file named "index2.htm". If the page is not named "index2.htm", change the part that says "index2.htm" in the code in step 4.
  6. Edit the code from step 4 so that the width and height of the frame to fit your layout.
  7. If you want to have a border around the frame, change the 0 after frameborder to 1.
  8. Change the message "Your browser does not support frames". Ideally, you should include the URL of the index2.htm page so that the user can still see the content.

Inline Frames Example