Is it legal to use IE specific metatags in HTML5?
Ive been trying to validate an html5 document with the following 2 lines in t开发者_Python百科he header:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="imagetoolbar" content="no" />
The entire document validates very nicely, but these 2 lines, which are IE specific, render the page invalid.
My question: is there a legal HTML5 syntax for these metatags? i'd very much like my code to be valid, but these tags cannot be dispensed with.
Depending on your access to the server/server-side code, you could deliver X-UA-Compatible as a header. I am not sure if the same can be done for imagetoolbar.
Edit: Your other option would be conditional comments:
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="imagetoolbar" content="no" />
<![endif]-->
精彩评论