English 中文(简体)
Should we use a frameset doctype if we use iframes?
原标题:

Why are iframes declared as a non-standard elements? It is useful.

Is it allowed in XHTML 1.1, or should we use a frameset doctype if we use iframes?

最佳回答

An iframe is a method of displaying another html document inside a frame on a webpage. The w3 is moving towards making all external files to be displayed in an html document done with the <object> tag. This includes applets, flash movies, even images. Iframe s deprecation isn t because the idea of having an html file displayed in a "frame" is bad, it s deprecated because there s now a "better" method of doing the same thing.

Iframe is completely dropped in XHTML 1.1, so it will probably not display. Iframes are valid in the non frameset doctypes that support them, but changing the doctype can sometimes change how it s displayed due to some bugs <cough> internet explorer </cough>.

Since support for iframes and the <object> tag is sketchy in many browsers, its best to test code using either of them carefully to make sure if behaves in the major browsers.

see replacing iframe with object in xhtml 1.1

问题回答

Because it s ugly and nobody wants multiple sets of scrollbars in their pages.

You can use the object. (http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5)

<object id="page" type="text/html" data="page.htm" width="500" height="600"> 
  <p>Oops! That didn t work...</p> 
</object>




相关问题
Is this syntatically valid for div?

<div class= clear ></div> /*which comes out to be below one in FF (seen via firebug) */ <div class= clear /> /*is this the last empty div declaration is semantically valid ? */

How to apply pagination in IFrame

I have an IFrame with a Table enclosed within it. I want to display 15 rows of a table and than a Next button must be there to move forward. How to apply pagination for IFrame?

Scala and HTML parsing

How do you load an HTML DOM document into Scala? The XML singleton had errors when trying to load the xmlns tags. import java.net._ import java.io._ import scala.xml._ object NetParse { import ...

热门标签