2012-08-11 10:29 said:
An iframe can contain content from another server that you have no
control over. If your document is html4 transitional, and loads an
iframe, the content of a document loaded in the iframe might be html4
strict, html4 frameset, xhtml1.*, html 5, or anything else that has a
valid doctype as long as it's served with the right doctype for what
it contains.
[...]
It Not on the same Web-Page.. For Iframe is HTML a Transitional Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
because it's have HTML with the Iframe on the same page..
Wrong. The doctype of the embedding document has no impact on the
doctype of the embedded document. This applies to all kinds of
embedding, including <iframe>, <frame>, and <object>. The embedded
document need not be an HTML document at all, and if it is, it can have
any doctype (including Frameset doctypes).
Besides, the doctype you gave does not conform to HTML specifications,
and it triggers Quirks Mode on IE.
So what Denis wrote is correct. It needs to be noted, however, that the
requirement "it's served with the right doctype for what it contains" is
mostly theoretical. Apart from triggering Quirks, Standards, or Almost
Standards mode, the doctype has no impact on browser behavior