Conditional HTML for Browsers Other than Internet Explorer

If you have been in front‑end web development for any period of time you will no doubt be familiar with the method of feeding different markup to specific versions of Internet Explorer via conditional comments. Up until the release of Internet Explorer 10, you could use these to target Internet Explorer, or more specifically by identifying versions or ranges of IE like so:
<!--[if IE 6]>
Content here will only be rendered by Internet Explorer 6
<![endif]-->
<!--[if lt IE 9]>
Content here will be rendered by Internet Explorer 8 and all versions below.
Note: not IE 9
<![endif]-->
<!--[if lte IE 9]>
Content here will be rendered by Internet Explorer 9 and all versions below.
Including IE 9
<![endif]-->
<!--[if IE]>
Content here will be rendered by all versions of Internet Explorer up to (but not
including) IE10 where support for these conditional comments stopped
<![endif]-->This works because other browsers only infer that the block is enclosed within comments (<!-- and -->) and so skip the content of the block altogether.
These have been used for years to enclose browser‑specific stylesheets, scripts, and even unsupported browser messages. You can see the official Microsoft documentation here. Conditional comments were disabled in Internet Explorer 10 standards mode when IE10 arrived in 2012. Microsoft's 2016 Internet Explorer support‑policy change is a separate milestone, not IE10's release.
Targeting Not IE Browsers
The flip side is the downlevel‑revealed form. Browsers that do not process conditional comments can see its contents, including IE10 in standards mode. Older IE document modes that support the syntax evaluate the condition:
<![if !IE]>
IE document modes that support conditional comments will ignore this.
<![endif]>
<![if !(IE 8)]>
IE 8 document mode will ignore this.
<![endif]>
<!--[if !IE]><!-->
Browsers without conditional-comment support will show this.
<!--<![endif]-->The first two forms use declarations that an ordinary HTML parser does not treat as a comment around the enclosed content. The third form uses comment delimiters around the conditional markers, leaving the content visible to browsers without conditional‑comment support.
In the IE document modes that understand these conditions, !IE is false and the enclosed content is skipped. This is not a test that excludes every version of Internet Explorer: IE10 standards mode treats the markers as ordinary comments. The third example follows the revealed‑comment structure explained by the Microsoft Edge team in 2016.
This vague distinction between using comments and not using them has tripped up many new ‑ and frustrated ‑ developers over on Stack Overflow.
It is probably for the best that Microsoft stopped processing these conditionals in standards mode. They are useful to recognise in an older template, but for new work I would start with standards‑based markup and feature detection rather than another browser‑specific branch.
Postscript
June 2026: This is an archive note from the Internet Explorer conditional‑comment era. Conditional comments stopped being a useful mainstream technique once modern Microsoft browsers moved on, but the pattern still explains why older templates sometimes contain unusual comment syntax around IE‑specific assets.