开发者

Inserting HTML5 Content into a Website with a different Doctype

开发者 https://www.devze.com 2023-02-14 04:13 出处:网络
Quick question just to verify something.If I have an HTML5 mobile advertisement that I made, and I want to run it on a publisher\'s website that has a DOCTYPE of XHTML-MP 1.0+ or XHTML 2.0 then my HTM

Quick question just to verify something. If I have an HTML5 mobile advertisement that I made, and I want to run it on a publisher's website that has a DOCTYPE of XHTML-MP 1.0+ or XHTML 2.0 then my HTML5 markup would probably be ignored, right?

For instance, if my ad used the canvas tag and it ran on someone's XHTML-MP 1.0 site, then mobile Safari would probably ignore the canvas tag and use the fallback content included between the opening and closing tags. Or if I used an input type "date" on an ad running on the same site, then it would default to input type "text", unless I wrote some javascript to handle this case.

I'm assuming this is probably the case, but I wanted to verify it with people much smarter than me :) Probably the best thing for me to do is serve up a banner and开发者_如何学运维 link to my ad in my own website using the HTML5 doctype or use an iframe to reference the same website.


Nowadays, the doctype is used by browsers to determine standards mode. Your elements will NOT be ignored but rendered no matter what doctype you use assuming, of course, the browser is capable of rendering the element.

0

精彩评论

暂无评论...
验证码 换一张
取 消