简体   繁体   中英

Can I load a page with an HTML 5 Doctype into a frame on a page with a Frameset Doctype?

I have a main frameset page, which uses the FRAMESET doctype..Now this has 3 frames inside it..

Now for the 2nd frame, I want to use some HTML5 code ()...So guess I'll have to use the doctype

Now my question is; can both these doctypes co-exist, which means can I declare FRAMESET doctype for the main frameset page and HTML5 Doctype for one of the frame page..

Can it cause any cross-browser issues? Also before you say, I know this is a strange question as I am using old/outdated frameset with the latest HTML5...But I have limited options (In fact, can't edit the main frameset page to use iframes)...So want to know how can I combine the 2?

Doctypes are specific to documents and each document has its own independent doctype. Having a different doctype in each frame is perfectly valid, and having the doctype of the frameset be different from the doctype of the frames is not only valid, it's impossible for it to be otherwise. Whether it's HTML 5 doesn't really enter into it.

Apparently the answer is no because as usual, Internet Explorer. This link: http://css-tricks.com/ie-iframe-quirksmode/ is validating my findings that my html5 document loaded inside of a frame loaded inside of a much older parent document with frameset doctype is rendering in quirksmode because "In IE, iFrames on Pages in Quirks Mode Also in Quirks Mode". It sounds like this is the case with Frames as well as IFrames even in IE11.

Now my question is; can both these doctypes co-exist, which means can I declare FRAMESET doctype for the main frameset page and HTML5 Doctype for one of the frame page..

They are separate, independent documents, so: yes .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM