Reputation:
I am using Bootstrap 3.
When I add <meta http-equiv="X-UA-Compatible" content="IE=edge">
, the site shows error in the W3C validator.
Upvotes: 0
Views: 3242
Reputation: 11
You can do:
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<![endif]-->
Upvotes: 1
Reputation: 96507
From my answer to a similar question:
In (X)HTML5, you may only use
http-equiv
values that are
- defined in the HTML5 spec, or
- registered in the WHATWG wiki page "PragmaExtensions".
The value X-UA-Compatible
is not defined in the spec, but it’s proposed in the wiki. "Proposed" means:
The following proposed extensions do not yet conform to all the registration requirements in the HTML spec and are therefore not yet allowed in valid documents.
So currently it’s not valid to use this value in (X)HTML5.
Upvotes: 1
Reputation: 9259
The validator is extremely pedantic. It's best to just ignore this particular validation warning, given its significant pragmatic benefit and complete lack of downsides. It's not an error of any kind in any of the major browsers.
Upvotes: 0