views:

22

answers:

2

I heard that iframes are deprecated in HTML5, and object tags should be used instead. But the page does not load from the frame.

Im not familiar with object tags, do i need to specify a classid or type text/html? Here's the tag:

<object src="http://site.com/"&gt;&lt;/object&gt;

Am I missing something, or has my browser(Chrome 6) not implemented this?

+1  A: 
<object data="file.html" width=400 height=400></object>

There are certain bugs in IE if that matters, and workarounds for them. If you need IE it might be easier to just use an iframe.

meder
thanks! Not very familiar with object tag, forgot it uses data="" instead of src...(accepted)
digitalFresh
+1  A: 

You heard wrong, iframes are definitely part of HTML5.

You should never need to use iframes in order to lay out your own site. CSS and the Object tag eliminate the need for that.

However, there are plenty of good reasons for iframes, and for the example you gave above, just use an iframe - it will work on almost all browsers.

dmazzoni