Tag <frame> HTML Reference


A simple three-framed page:

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

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

The <frame> tag is not supported in HTML5.

The <frame> tag defines one particular window (frame) within a <frameset>.

Each <frame> in a <frameset> can have different attributes, such as border, scrolling, the ability to resize, etc.

2. Tips and Notes

Note: If you want to validate a page containing frames, be sure the <!DOCTYPE> is set to either "HTML Frameset DTD" or "XHTML Frameset DTD".

3. Differences Between HTML 4.01 and HTML5

The <frame> tag is not supported in HTML5, but is supported in HTML 4.01.

4. Differences Between HTML and XHTML

In HTML, the <frame> tag has no end tag. In XHTML, the <frame> tag must be properly closed.

5. Optional Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
frameborder 0
Specifies whether or not to display a border around a frame F
longdesc URL Specifies a page that contains a long description of the content of a frame F
marginheight pixels Specifies the top and bottom margins of a frame F
marginwidth pixels Specifies the left and right margins of a frame F
name name Specifies the name of a frame F
noresize noresize Specifies that a frame is not resizable F
scrolling yes
Specifies whether or not to display scrollbars in a frame F
src URL Specifies the URL of the document to show in a frame F

6. Standard Attributes

The <frame> tag supports the Standard Attributes in HTML.

7. Event Attributes

According to the W3C, the <frame> tag does not support any event attributes in HTML 4.01. However, the onload event is supported in all browsers.

Relative articles