xHTML 1.0 strict - Validate iFrames

别来无恙 提交于 2019-12-12 08:47:42

问题


Is it possible to validate iFrames in xhtml 1.0 strict? Preferably without any use of javascript to inject the iframe into the page.

I know there is no point in validating just for the sake of validation, but lets just say that I like the green validation message on w3c ;) (I am forced by factors beyond my control to use iframes)

Or maybe there is something very similar I can use in xHTML to get iframe-like behavior without losing compatibility across different browsers? (object?)

Perhaps there is a way to add a second doctype containing iframe rules?


回答1:


i'm not sure but I think you can include another page with object as you suggest.

<object data="/another.html" type="text/html"></object>



回答2:


If you need iframes, use Transitional instead of Strict. The point of it is for when you need to use legacy features like iframes.



来源:https://stackoverflow.com/questions/985333/xhtml-1-0-strict-validate-iframes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!