HTML Frames

Frame Tags and Attributes

Tags shown in violet work in later versions of Internet Explorer and Netscape, but may not work in all browsers.

Example 1


<HTML>

<HEAD>
  <TITLE>Frame Example</TITLE>
</HEAD>

<FRAMESET COLS="30%,*">
  <FRAME NAME="SideBar" SRC="contents.html">
  <FRAME NAME="Main" SRC="welcome.html">
</FRAMESET>

<NOFRAMES>
  <BODY>
  <H1>Sorry, you lose. Get a real browser.</H1>
  </BODY>
</NOFRAMES>

</HTML>
 
 
SideBar
 
 
 
 
 

contents.html

Main
 
 
 
 
 

welcome.html

Frame Test 1



Example 2


<HTML>

<HEAD>
  <TITLE>Frame Example</TITLE>
</HEAD>

<FRAMESET ROWS="10%,*">
  <FRAME NAME="Title" SRC="logo.html">
  <FRAMESET COLS="30%,*">
    <FRAME NAME="SideBar" SRC="contents.html">
    <FRAME NAME="Main" SRC="welcome.html">
  </FRAMESET>
</FRAMESET>

</HTML>
 
 
Title
logo.html
SideBar
 
 
 

  contents.html

Main
 
 
 

  welcome.html

Frame Test 2



Using Hyperlinks with Frames


Example 3


<A HREF="product_list.html" TARGET="Main">Click here</A>

-- or --

<HEAD>
  <TITLE>Frame Example</TITLE>
  <BASE TARGET="Main">
</HEAD>
...
<A HREF="product_list.html">Click here</A>


Example 4


<A HREF="http://www.pomona.edu" TARGET=_blank>Pomona College</A>

Pomona College


Example 5


<P>...The main Web site of Pomona College is shown in the box
<IFRAME SRC="http://www.pomona.edu" WIDTH=630 HEIGHT=300
        HSPACE=15 VSPACE=5 ALIGN=RIGHT>
</IFRAME> to the right.  We invite you to browse these pages
and blah blah blah...</P>

Internal Frames