<frame>

The <frame> tag is used to define individual frames within a <frameset>, displaying separate HTML documents within each frame.
This feature is outdated and no longer recommended. While some browsers may still support it, it might have been removed from web standards, is in the process of being phased out, or is only maintained for compatibility. It’s best to avoid using it and update existing code if possible. Check the compatibility table at the bottom of the page for guidance, as this feature may stop working at any time.

<frame> Tag

The <frame> element is used to define sections within a <frameset>, allowing multiple HTML documents to be displayed in different frames.

Syntax

index.html
<frameset cols="percentage,width" rows="percentage,height">
  <frame src="url" name="frame_name">
  <!-- More frame elements here -->
</frameset>

Example

index.html
<h1>The iframe element</h1>
<iframe src="https://institute.qarpeo.com" title="Qarpeo Free Online Web Tutorials">
</iframe>

Attributes

This element supports standard global attributes.

  • src: Defines the URL of the document that appears in the frame.
  • name: Assigns a name to the frame, which can be used for targeted links. If omitted, links open in the closest parent frame.
  • noresize: Prevents the frame from being resized by users.
  • scrolling: Determines whether scrollbars appear. If unspecified, the browser adds them as needed.
  • margin-height: Sets the vertical margin between the frame's content and its border.
  • margin-width: Sets the horizontal margin between the frame's content and its border.
  • frameborder: Controls the visibility of the frame's border.

Conclusion

The <frame> element was used to create sections within a <frameset>, enabling multiple HTML documents to be displayed in different frames within a browser window. However, it is now considered outdated and not recommended for modern web development due to accessibility and usability concerns. Instead, the <iframe> tag is commonly used to embed external content within a webpage.