views:

173

answers:

1

Ive been trying to validate an html5 document with the following 2 lines in the 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.

+4  A: 

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]-->
GWB
Hey, nice idea with the conditional comments! +1.
Pekka
i know an idea rocks when it is comprised fully of things i already knew, only someone else was smart enough to put them together in a way i didn't think of myself :) **nice one**, +1 to you, and, of course, answer accepted.
Nir Gavish
sorry to say it doesn't work :(
Nir Gavish
Well that sucks. You can still go the header route for IE compatibility mode (though I am not sure why you'd want to emulate IE7 for what I assume is new code if you are using HTML5). That being said, I personally disagree with W3C's decision to validate metadata content. IMO you should be able to specify any metadata about the document that you desire (and it appears that this used to be the case -- these meta elements do not throw errors in HTML4 and XHTML1).
GWB