HTML <frame> tag


Simple three-page framework:


<frameset cols="25%,50%,25%">
  <frame src="frame_a.htm" />
  <frame src="frame_b.htm" />
  <frame src="frame_c.htm" />


Try it yourself

Browser Support

IE Firefox Chrome Safari Opera

All browsers support <frame> tag.

Definition and Usage

<Frame> tag defines the frameset in a particular window (frame).

frameset each frame can be set different properties, such as border, scrolling, noresize like.

Differences between HTML and XHTML

In HTML, <frame> tag has no end tag.

In XHTML, <frame> tag must be closed properly.

Tips and Notes:

Note: If you want to verify that the page contains frames, make sure that the doctype is set to "Frameset DTD". Read more about DOCTYPE content.

Important: You can not <frameset> </ frameset> tag using the <body> </ body> tag along. However, if you need to add a <noframes> tag browser does not support frames, be sure to place this tag in <body> </ body> tag!

Optional attributes

Attributes value description
  • 0
  • 1
Specifies whether to display a border around the frame.
longdesc URL Predetermined page contains information about a long description of the frame contents.
marginheight pixels Upper and lower margins defined framework.
marginwidth pixels Margins define the left and right of the frame.
name name It specifies the name of the frame.
noresize noresize Provisions can not resize the frame.
  • yes
  • no
  • auto
Specifies whether scroll bars appear in the frame.
src URL It specifies the URL of the document is displayed in a frame.

Standard property

id, class, title, style

For a full description, go to Standard property .

Examples TIY

Vertical frame
This example demonstrates: how to use three different document production a vertical frame.
Horizontal frame
This example demonstrates: how to use three different document production a horizontal frame.
How to use the <noframes> tag
This example demonstrates: how to use the <noframes> tag.
Hybrid frame structure
This example demonstrates how to create a frame containing three documents, while mixing them placed among the rows and columns.
Containing noresize = "noresize" frame structure property
This example demonstrates noresize property. In this case, the frame can not be resized. Drag the mouse on the border between the frame, you will find that the border can not be moved.
Navigation frame
This example demonstrates how to make a navigation frame. The navigation frame contains a second frame as the target list of links. File named "contents.htm" contains three links.
Inline frame
This example demonstrates how to create an inline frame (HTML page framework).
Jump to a specific section within the framework of
This example demonstrates two frames. A framework which provided a link to another file in the specified section. Within this "link.htm" file specified section using <a name="C10"> identified.
Use frame navigation jump to the specified section
Benli demonstrates two frames. Navigation frame on the left contains a list of links, the links will be the second frame as the target. The second frame shows the linked document. Navigation framework with links to the target file in the specified section.