I see that HTML has both a frame
tag and an iframe
tag. How are they different, and when should one be preferred over the other?
Asked
Active
Viewed 544 times
0

Paul S.
- 4,362
- 10
- 35
- 52
-
Possible duplicate of [What's the difference between IFrame and Frame?](https://stackoverflow.com/questions/1079128/whats-the-difference-between-iframe-and-frame) – Shivam Sharma Oct 24 '17 at 12:11
1 Answers
1
How are they different?
A frame appears inside a frameset. An iframe appears inside an HTML document that has a <body>
.
and when should one be preferred over the other?
They do significantly different things.
Both can break linking/bookmarking (so should be used rarely), but the use cases for regular frames make it more likely that will happen with them than with iframes.

Quentin
- 914,110
- 126
- 1,211
- 1,335