Test for CC not on IE 5.0-9.0
You are not using Internet Explorer 5.0-9.0

 !IEMobile 
 IEMobile 
 !IE 
 IE 
 lte IE 5   IE 5   gte IE 5   gt IE 5 
 lte IE 5.0   IE 5.0   gte IE 5.0   gt IE 5.0 
 lt IE 5.0100   lte IE 5.0100   IE 5.0100   gte IE 5.0100   gt IE 5.0100 
 lt IE 5.5000   lte IE 5.5000   IE 5.5000   gte IE 5.5000   gt IE 5.5000 
 lt IE 6.0   lte IE 6.0   IE 6.0   gte IE 6.0   gt IE 6.0 
 lt IE 6   lte IE 6   IE 6   gte IE 6   gt IE 6 
 lt IE 7.0   lte IE 7.0   IE 7.0   gte IE 7.0   gt IE 7.0 
 lt IE 7   lte IE 7   IE 7   gte IE 7   gt IE 7 
 lt IE 8.0   lte IE 8.0   IE 8.0   gte IE 8.0   gt IE 8.0 
 lt IE 8   lte IE 8   IE 8   gte IE 8   gt IE 8 
 lt IE 9.0   lte IE 9.0   IE 9.0   gte IE 9.0   gt IE 9.0 
 lt IE 9   lte IE 9   IE 9   gte IE 9   gt IE 9 
 lt IE 10.0   lte IE 10.0   IE 10.0   gte IE 10.0   gt IE 10.0 
 lt IE 10   lte IE 10   IE 10   gte IE 10   gt IE 10 
 IE 5   IE 5.0   IE 5.00   IE 5.000   IE 5.0000   IE 5.00000   gt IE 5 or !IE   gt IE 5 or !IE 
 IE 5   IE 5.0   IE 5.01   IE 5.010   IE 5.0100   IE 5.01000   gt IE 5.0100 or !IE   gt IE 5.0100 or !IE 
 IE 5   IE 5.5   IE 5.50   IE 5.500   IE 5.5000   IE 5.50000   gt IE 5.5000 or !IE   gt IE 5.5000 or !IE 
 IE 6   IE 6.0   IE 6.00   IE 6.000   IE 6.0000   IE 6.00000   gt IE 6 or !IE   gt IE 6 or !IE 
 IE 7   IE 7.0   IE 7.00   IE 7.000   IE 7.0000   IE 7.00000   gt IE 7 or !IE   gt IE 7 or !IE 
 IE 8   IE 8.0   IE 8.00   IE 8.000   IE 8.0000   IE 8.00000   gt IE 8 or !IE   gt IE 8 or !IE 
 IE 9   IE 9.0   IE 9.00   IE 9.000   IE 9.0000   IE 9.00000   gt IE 9 or !IE   gt IE 9 or !IE 
 IE 10   IE 10.0   IE 10.00   IE 10.000   IE 10.0000   IE 10.00000   gt IE 10 or !IE   gt IE 10 or !IE 

Each of the expressions for Conditional Comments give either “true” or “false” (for the latter, to be more precisely, their negations give “true”):

As you can see, all expressions work correctly. The test checks for variations on version numbers, most of which are supposed to be acceptable syntax according to Microsoft.

Problems occur in IE 5.5 (only “IE 5.5000” works) and old versions of IE 5.0 (in IE 5.01 only “IE 5.0100” works, so if you want to target all IE 5.0 versions you need to check for “IE 5.0 or IE 5.0100”), so this table may give you some reasoning why to avoid those problematic version numbers in your CC’s.

Note: Support for Conditional Comments is removed in IE 10.
This means you can only use Conditional Comments in IE 10 when using Compatibility View, which makes IE 10 emulate legacy IE versions.
So if you want to target Internet Explorer 5.0-9.0 (and not IE 10 and higher, because of the removal of Conditional Comments support) you can just use “if IE”.


Test Page For Conditional Comments For IE
Created by: Manfred Staudinger
Created on: Febuary 4, 2005
Updated by: Hilbrand Edskes