Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I have doctype in iframe different from hosting page

Can I have doctype in iframe different from hosting page or iframe necessarily inherits doctype from hosting page?

<!DOCTYPE 1>
<html>
   <body>
      <iframe>
      <!DOCTYPE 2>
      </iframe>
</body>
</html>
like image 448
Michael Chernetsov Avatar asked Mar 22 '11 12:03

Michael Chernetsov


People also ask

Can you iframe a specific part of page?

Set the iframe to the appropriate width and height and set the scrolling attribute to "no". If the area you want is not in the top-left portion of the page, you can scroll the content to the appropriate area.

Is there a better way than iframe?

Use the embed Tag as an Alternative to Iframe in HTML The embed tag is similar to the object tag, and it is used for the same purpose. We can embed various external resources in our web page using the embed tag. We can embed media like PDF, image, audio, video, and web pages.

Could an iframe be used to display a web page content within a current web page?

An HTML iframe is used to display a web page within a web page.

How many iFrames can a page have?

Except that there is a higher resource demand and other performance issues there is no fixed limitation for those tags on one page.


2 Answers

Yes, you can have a different doctype in the page that loads in the iframe.

The page containing the iframe and the page loading in the iframe are completely separate. The page in the iframe doesn't inherit anything at all from the page containing the iframe.

like image 189
Guffa Avatar answered Oct 23 '22 06:10

Guffa


You can do this. No problem (for example flash ads).

like image 43
Guillaume Lecanu Avatar answered Oct 23 '22 08:10

Guillaume Lecanu