HTML Tags

HTML <frame> Tag

The <frame> tag in HTML was used to define a specific region within a <frameset> that could display a separate HTML document.
Frames allowed web developers to split the browser window into multiple sections, each loading a different webpage.
This tag is deprecated in HTML5 and replaced by more modern layout techniques using CSS Flexbox, Grid, or iframes.

Syntax

<frameset cols="50%,50%">
  <frame src="left.html">
  <frame src="right.html">
</frameset>

Attributes

AttributeDescription
srcSpecifies the URL of the document to be displayed in the frame.
nameAssigns a name to the frame (used for linking).
scrollingControls whether scrollbars appear (yes, no, or auto).
noresizePrevents resizing of the frame by the user.
frameborderDefines whether the frame has a border (1 or 0).
marginwidthSets the left and right margins of the frame content.
marginheightSets the top and bottom margins of the frame content.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Frame Tag Example</title>
</head>

<!-- Frameset replaces body when using frames -->
<frameset cols="50%,50%">
  <frame src="https://freethings.org.in" name="leftFrame" frameborder="1" scrolling="auto">
  <frame src="https://hindigems.com" name="rightFrame" frameborder="1" scrolling="auto">
</frameset>

<noframes>
  <body>
    <p>Your browser does not support frames. Please use a modern browser.</p>
  </body>
</noframes>
</html>

Output

Browser Output

There is no visible output in HTML5 browsers as the <frame> tag is not supported.
In older browsers, this code splits the window into two columns — each displaying a different webpage.
You can use the TryIt Editor to view how it worked in legacy browsers.

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
❌No❌No❌No❌No❌No⚠️Partial

No Major browser support for this <frame> tag.

Notes

  • The <frame> tag cannot be used inside the <body> tag — it must be used within a <frameset>.
  • Frames are deprecated due to accessibility, usability, and SEO issues.
  • Use CSS layouts or <iframe> for embedding external content instead.

Conclusion

The <frame> tag was once used to divide a webpage into multiple sections displaying separate documents.
It is now obsolete in HTML5 and replaced by modern layout methods like CSS Grid, Flexbox, or embedding techniques using <iframe>.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend