HTML <frame> src Attribute

Last Updated : 11 Jul, 2025

The HTML <frame> element's src attribute is used to specify the URL of the webpage or content to be displayed within the frame. It allows different documents or resources to be embedded into a specific frame section. However, the <frame> element is deprecated in HTML5, and using the <iframe> element is recommended for embedding content.

Syntax

<frame src="URL">

Attribute Values

It contains a single value URL which specifies the source of the document. The possible value of the URL is:

  • absolute URL: It points to another website.
  • relative URL: It points to a file within a website.

Note: The <frame> src Attribute is not supported by HTML 5.

Example: In this example we use a <frameset> with three columns. Each column displays an image (attr1.png, gradient3.png, col_last.png) in separate frames, defined by the frame tags with src attributes.

html
<!DOCTYPE html>
<html>

<head>
    <title>HTML frame src Attribute</title>
</head>

<frameset cols="30%, 40%, 30%">
    <frame name="top"
           src="attr1.png" />
    <frame name="main" 
           src="gradient3.png" />
    <frame name="bottom" 
           src="col_last.png" />
</frameset>

</html>

Output:

Supported Browsers:

The browser supported by HTML <frame> src Attribute are listed below:

Comment