HTML encyclopaedia

The frame tag

Note. This tag is not included in the HTML 3.2 standard.

The <frame> tag defines a frame. It may only be used within a <frameset> container. The size of a frame is defined by the <frameset> tag. The <frame> tag has 6 attributes.

  1. src

    The value of this attribute will be the URL of the page to be displayed within the frame. It should be emphasized that the display is governed by the HTML within the page whose URL is quoted, no text (or image) rendering attributes are carried from the "parent" page into the frame.

    If the attribute is omitted the frame is initially blank, however since a frame is likely to be target, a page will appear within the frame as soon as the user selects a link with the page as target.

  2. name

    The value of this optional attribute defines the name of the frame. It provides the mechanism by which selecting a link in one frame causes a page to appear within another frame.

    Names may not start with an underscore, there are four "special" frame names thus

  3. marginwidth
  4. marginheight

    These two attributes define the minimum space between the text etc., diaplyed within a frame and the frame boundary.

  5. scrolling

    The value of this attribute is either yes or no. It controls whether the text etc., displayed within the frame can be scrolled using a scroll bar on the right-hand edge of the frame. If it is omitted scrolling is allowed and a scroll bar displayed.

  6. noresize

    This attribute has no associated value. If present it prevents the user grabbing the boundary between the frame and an adjacent frame and dargging so as to increase or decrease the width of the frame.


See also <frameset> and general notes on frames