HTML <frame> Tag

The <frame> tag defines a specific window, a frame, where we can load another web page. To specify the address of this web page, use the src attribute. There can be several such frames on one web page.

The <frame> tag is used with the <frameset> element, which define how to divide the window into frames.

The <frame> tag isn’t supported in HTML5. Use the <iframe> tag instead.

Syntax

The <frame> tag doesn’t require the closing tag.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <frameset cols="50%,50%">
    <frame src="https://www.w3docs.com/learn-html/html-basic.html">
    <frame src="https://www.w3docs.com/learn-css/css-syntax.html">
  </frameset>
</html>

Result

Attributes

Attribute Value Description
bordercolor color Defines the color of the border around the frame.
Not supported in HTML 5.
frameborder 0
1
Defines if the border around the frame should be displayed or not.
Not supported in HTML 5.
longdesc URL Defines a page which has a long content description of a frame.
Not supported in HTML 5.
marginheight pixels Defines top and bottom margins of a frame.
Not supported in HTML 5.
marginwidth pixels Defines left and right margins of a frame.
Not supported in HTML 5.
name text Defines the name of a frame. (It is recommended to always set this attribute, especially in cases when it is necessary to upload a document to another via a link from one frame.)
Not supported in HTML 5.
noresize noresize Defines if the user can change the frame size or not.
Not supported in HTML 5.
scrolling yes
no
auto
Defines if the scroll bar should be displayed or not.
Not supported in HTML 5.
src URL Defines the URL of the page, which should be loaded in the frame.
Not supported in HTML 5.

The <frame> element also supports the Global Attributes.

Browser support