Inline Frames Tutorial

Tutorial

  1. Create a file named "index.html".
  2. Put your layout code on the index.html file. Do not put the content on index.html - the content goes inside the frame.
  3. Put the below code on index.html after the <head> tag.
    <base target="frame">
  4. Put the below code on index.html where you want the frame to appear.
    <iframe name="frame" src="index2.html" height="300" width="500" frameborder="0">
        Your browser does not support frames.
    </iframe>
  5. Create a file named "index2.html". If the page is not named "index2.html", change the part that says "index2.html" 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.html page so that the user can still see the content.

Inline Frames Example