Reputation: 13
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?
Upvotes: 0
Views: 953
Reputation: 1321
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.
Upvotes: 2
Reputation: 187
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.
Upvotes: 0