Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it legal to use IE specific metatags in HTML5?

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.

like image 661
Nir Gavish Avatar asked Jun 04 '10 20:06

Nir Gavish


1 Answers

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]-->
like image 116
GWB Avatar answered Sep 23 '22 12:09

GWB