RaysWebClass.Com


Lesson 10:   HTML iframes

HTML iframes
HTML iframe is an inline frame that is used to embed another document within the current HTML document..
<iframe src='http://www.outreach.lsu.edu'></iframe>


Optional Attributes:

Attribute Value Description
frameborder 0 | 1 Specifies whether or not to display a border around the iframe
height pixels | % Specifies the height of the iframe
marginheight pixels Specifies the top and bottom margins
marginwidth pixels Specifies the left and right margins
name text Specifies the name of the iframe
scrolling yes | no | auto Specifies whether or not to display scrollbars in the iframe
src URL Specifies the address of the document to embed in the iframe
width pixels | % Specifies the width of the iframe


Standard Attributes:

Class, id, style, & title
NOTE: To see Parent ifame links and variables, Click here

Web Page Design: Exercise 10

  1. Create a new folder in the HTML folder and name it includes
  2. Open the new includes folder and create a file named menu.html
  3. Open the menu.html file and paste the following code:
    <font face='verdana'>
    <a href='../index.html' target='_parent'>Home</a>
    <br><br>

    <a href='../History.html' target='_parent'>History</a>
    <br><br>

    <a href='../Products.html' target='_parent'>Products</a>
    <br><br>

    <a href='../Contact.html' target='_parent'>Contact Us</a>
    </font>
  4. Save the menu.html file.
  5. Move back to the HTMLClass folder and open index.html
  6. Replace the Navigation Menu with the following:
        <!-- * * * * * * * * * * -->
        <!-- * Navigation Menu * -->
        <!-- * * * * * * * * * * -->
        <br>
        <iframe width='110' height='840' scrolling='no'
          frameborder='0'
          src='includes/menu.html'>
        </iframe>
  7. Check to make sure the menu appears on the Home page.
  8. If it does appear, make the same change to:
    Contact.html, History.html, Products.html, and template.html
  9. Chick to make sure all pages link as they should
For a complete copy of the HTMLWeb Folder with all of the pages and images click here.
For a review of the HTML Tags click here.