Represents a conditional comment.

Conditional comments are used to control the display of elements in order to create a more consistent viewing experience. In order to make a number of features visible in a Web browser, you can specify HTML elements that are used only by Web browsers to display content. Conditional comments are specified around these elements.

A conditional comment can have one of two forms. The down-level-revealed form reveals the contents of the comment in Web browsers. The down-level-hidden form hides the contents of the comment.

Down-level revealed comment

<![if expression]>...<![endif]>

Down-level hidden comment

<!--[if expression]>...<![endif]-->

Example

In the following example, the content is displayed if the browser is a version of Internet Explorer 5 or later.

<!--[if IE]>Some content<![endif]-->

See Also

ConditionalComment Members | DOM Namespace