1

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/"></object>

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

2 Answers 2

1
<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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.