Conditional comment

[2] There exists an adjacent technology in JScript (Microsoft's non-standard implementation of JavaScript) called conditional compilation, which uses @-prefixed codes in the style of preprocessor macros in C and C++.

It is formatted like: The code between the if and endif markup can be any HTML content that is included if the condition evaluates true or excluded otherwise.

Microsoft acknowledges this syntax is not standardized markup,[4] intending these tags to be overlooked by other browsers and expose the content in the middle.

In order to ensure compliance with W3C standards, some web developers use an alternative technique[5] for downlevel-revealed conditional comments: While possibly confusing, this syntax is valid (X)HTML and is useful for conditional sections intended specifically for non-IE browsers; if the condition evaluates to true (for example, if targeting non-IE browsers and on some versions of IE), IE displays the --> present before the HTML content.

IE 4 introduced a similar mechanism for JScript, called conditional compilation[6] that was dropped in version 11 standards mode.