Frames Continued

The <FRAME> tags control each frame within a <FRAMESET>. There are a number of attributes for the <FRAME> tag that control what and how a page will be displayed within a particular frame. For every division in a <FRAMESET> tag, you must have a corresponding <FRAME> tag. The tags are listed in order, so if you have <FRAMESET COLS="100,*". The first <FRAME> tag will refer to the frame that's 100 pixels wide and the second <FRAME> tag will be in the remaining space.
  • NAME= You must name your frames in order to control where your pages are displayed. The name can be anything you like, for example: <FRAME NAME="menu">. When you use a hyperlink to load a page into a frame, you would use this name with a TARGET= in the link itself. For example, let say you have a frame named "BODY" and you want to load a page into it with a hyperlink. The resulting tag would be:
    <A HREF="mypage.htm" TARGET="BODY">See my page</A>.
    If you don't specify a target, the page would be loaded into the frame the link was located in.
  • SRC= The source for the frame is the name of the web page you want loaded when the frames are first displayed. For example:
    <FRAME NAME="Menu" SRC="menu.htm">
  • SCROLLING="YES/NO/AUTO" specifies whether or not to display scroll bars if the page doesn't fit within a frame.
  • MARGINWIDTH and MARGINHEIGHT= sets the size of the margins in the frame in pixels. Both are optional.
  • NORESIZE by default, a user can drag the border of a frame to change its size. To prevent this, use the NORESIZE attribute.
The NOFRAMES tag is used to contain a web page that would be displayed if a users browser doesn't support frames. Frames are defined in the head section of a web page, the NOFRAMES would then contain the rest of a page.