0

Is it possible to include iframe with HTML5 format inside HTML4 document? Then, will HTML5 features work as expected? Or, will root document restrict the HTML5 features?

2 Answers2

2

The doctype declaration will not restrict the elements if the browser needs to support the element.

https://html5test.com/results/desktop.html Source: HTML 4 Iframe with HTML5 content

So, answering your questions:

  • Yes it is possible to do this.

  • Yes all features will work, if the browser supports it.

  • No there will be no restrictions because of the document.

Community
  • 1
  • 1
Steyn
  • 1,311
  • 8
  • 15
0

Normally, it will be. Frame rendering is independent of the parent page, so I think you will be able to load almost any page, even HTML5, in a frame on a root page with an older !DOCTYPE.