Getting contradictory messages about that, hope they're not. I cannot imagine support for it would stop, since a gazillion sites use them.
Some additional questions about that:
The iframe element is supported by all modern desktop and mobile browsers. However, some browsers don't yet respond consistently to the three new HTML5 attributes for this element.
First, the frame and frameset elements are not deprecated in HTML5, they're obsolete (i.e., they've been removed entirely).
If you create an iframe, your site becomes vulnerable to cross-site attacks. You may get a submittable malicious web form, phishing your users' personal data. A malicious user can run a plug-in. A malicious user can change the source site URL.
Support for <iframe>
is still there in HTML 5, so I don't think this will change in the near future.
To answer your other questions:
<iframe>
s (as frames in general) are most of the time not user-friendly: <div>
To be clear: I'm talking about <iframe>
as an interface element. Not a hidden element for loading other stuff like e.g. Google Mail does.
In my opinion the W3C jumped the gun in dumping iframes from the Strict HTML and XHTML doctypes. In theory you would use the <object>
element to add foreign objects to your document, but browser differences and limitations have made this a nonstarter for many developers. With the much-more-pragmatic HTML 5 (which is still a draft), iframes are back and even have two new attributes: seamless
, and the intriguing sandbox
.
IFrames are not obsolete, but the reasons for using them are rare.
Reasons for using iframes:
I would also answer that there is no need for the removal of iframes, it's a needed tag and will be around for a while.
Iframes are obsolete for page layout. Never use them instead of good CSS layout, even table-based layout is better.
Good reasons for using iframes are:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With