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.

Specifies whether or not to display a border around a frameF
longdescURLSpecifies a page that contains a long description of the content of a frameF
marginheightpixelsSpecifies the top and bottom margins of a frameF
marginwidthpixelsSpecifies the left and right margins of a frameF
namenameSpecifies the name of a frameF
noresizenoresizeSpecifies that a frame is not resizableF
Specifies whether or not to display scrollbars in a frameF
srcURLSpecifies the URL of the document to show in a frameF

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