<frame> Tag in HTML
The <frame> tag was used to specify a particular window (or frame) within a frameset where a specific HTML document could be displayed. It allowed web pages to load multiple HTML files within the same window, dividing the page into separate scrollable sections. Frames are no longer supported in HTML5 due to accessibility, usability, and compatibility issues.
Usage Notice:
- The <frame> tag is no longer supported in modern HTML (HTML5).
- To embed external content, the <iframe> tag should be used instead, which is supported in HTML5.
- The <frameset> tag was used alongside <frame> to define multiple frames, but it too is obsolete.
Syntax of the Obsolete <frame> Tag:
Syntax Example
<frameset rows="50%,50%">
<frame src="top.html">
<frame src="bottom.html">
</frameset>
Modern Alternative - Using <iframe> Tag
Instead of using frames, you can use the <iframe> tag to embed an external HTML document within a webpage:
Code Example with <iframe>
<iframe src="html1.1.html" width="100%" height="500">
Your browser does not support iframes.
</iframe>
Output
While the <frame> tag is deprecated and should no longer be used, the <iframe> tag is the modern approach to embed separate documents in HTML, offering greater control over styling, accessibility, and layout.