The <frame>
tag was used inside a <frameset>
to define individual frames (sections of the window) for displaying separate documents.
🧪 Example (Old HTML 4 Code)
<frameset cols="50%,50%">
<frame src="menu.html">
<frame src="content.html">
</frameset>
📍 This would create two vertical frames side by side.
🚫 Why <frame>
Is Obsolete
- Poor accessibility
- Hard to navigate (no standard back/forward behavior)
- Complicated layouts
- Difficult bookmarking
- Not responsive or mobile-friendly
✅ Modern Alternative: <iframe>
Use the <iframe>
tag to embed external pages within your layout:
<iframe src="content.html" width="600" height="400">
Your browser does not support iframes.
</iframe>
✅ It keeps everything inside a single, manageable HTML document.
✅ Summary
Tag | <frame> |
---|---|
Status | ❌ Deprecated (HTML5) |
Use with | <frameset> (also deprecated) |
Purpose | Display separate HTML docs in one window |
Replacement | ✅ <iframe> |