Search code examples
htmlbrowsercompatibilityincompatibilityhtml4

HTML5 iframe in HTML4 document


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?


Solution

  • 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.