HTML frame Tag

  • The <frame> tag defines frame window. The <frameset> tag holds one or more <frame> elements.

  • HTML <frameset> tag used to split the browser window in several individual frames that can contain a separate HTML web document. The <frame> tag used improve appearance and usability of a site.

  • HTML <frame> tag remove in HTML5 specification.


<body style="background-color:#ff9900;">
  <h2 align="center">First frame (frame_1.html)</h2>

<body style="background-color:#ffcc00;">
  <h2 align="center">Second frame (frame_2.html)</h2>

  <title>Frameset Example 1<title>
<frameset rows="35%, 65%">
  <frame src ="frame_1.html" />
  <frame src ="frame_2.html" />

Run it...   »

<frame> Tag Attributes

HTML <frame> tag support following specific attributes. All following attributes has been removed in HTML5.

Attributes Value Description
frameborder 0
Specify whether display a border or not.
longdesc url Specify URL link to another page having a long description of the frame contents.
marginheight pixel_size Specify the top and bottom margins of frame.
marginwidth pixel_size Specify the left and right margins of frame.
name name Specify the frame name.
noresize noresize Specify that prevents to resize frame.
scrolling auto
Specify weather scrollbars should be display or not.
src url Specify web document URL to show in a frame.

Global Attributes

HTML <frame> tag support following global attributes.

Attributes Value Description
id unique_name Declared unique id for an element.
class class_name Declared one or more classnames for an element.
style styles CSS inline styles specify an element.
title title Specify extra details of element contain, this will display as a "tooltip" for an elements.

Event Attributes

HTML <frame> tag does not support any event attributes.

Browser Compatibility

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge
  • Opera
  • Safari