Conditional Comments

By: Dusty Arlia
Published on Tuesday, September 10, 2013, 08:18 PM
Last Updated on Monday, July 06, 2015 at 2:43 PM
Total Updates: 2

Conditional comments are comment tags supported in Internet Explorer 5 and later. These tags look similar to regular HTML comment tags. They are treated as normal comments except in IE where they can handle conditions. These allow you to "comment out" any portion of your page in a way that only IE browsers interpret the containing content, or that all non-IE browsers read the content.

Here is the basic syntax:

<!--[if IE]>
You are using IE (IE5+ and above).
<![endif]-->

<!-- Or -->
 
<!--[if !IE]>
You are NOT using IE.
<![endif]>

Comments:

Ad:

Ad: