HTML <frame> tag

Updated: 11/13/2018 by Computer Hope
HTML frame tag

When writing in HTML (hypertext markup language), the <frame> tag was a block element used to designate a specific window within a <frameset> element. It was useful in some instances because it allowed each window to have its own set of attributes and could contain an entire document. The following sections contain information about the <frame> tag, including an example of its code, related attributes, and browser compatibility.

Note

The <frame> element is not supported going forward. We recommend using the <iframe> or <div> tag with CSS (cascading style sheets) to achieve a similar effect.

Example of <frame> code

<frameset cols="25%,25%,50%">
<frame src="frame1.htm">
<frame src="frame2.htm">
<frame src="frame3c.htm">
</frameset>

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <frame> tag had the following unique attributes.

Attribute Description
frameborder Toggles frame borders on and off.
longdesc Designates that the frame's content has a long description.
marginheight Designates both bottom and top margin sizes.
marginwidth Designates both right and left margin sizes.
name Designates a name for the frame.
scrolling Toggles scrollbars for the frame on and off.
src Designates the page's URL (uniform resource locator) of a document to be shown in the frame.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Browser, Code, Compatibility, Scroll bar, URL, Web design terms, Window