[X]

Conditional Comments

browser wars 1999 dead

A comment that only one browser could see inside.

In 2026: Dead since Internet Explorer 10 dropped support in 2012. Every other browser saw a plain comment, which is what made it the only browser filter that was not a parser bug. The downlevel-revealed form was invalid HTML on purpose.

Where it came from: Microsoft Internet Explorer 5 documentation, 1999. The HTML class pattern is Paul Irish's, 2008. Wikipedia

<!--[if IE]>          <p>Any Internet Explorer</p>          <![endif]-->
<!--[if IE 6]>        <p>Exactly IE 6</p>                   <![endif]-->
<!--[if lt IE 9]>     <script src="html5shiv.js"></script>  <![endif]-->
<!--[if gte IE 5.5]>  <p>IE 5.5 and up</p>                  <![endif]-->
<!--[if !IE]> -->     <p>Everyone except IE</p>        <!-- <![endif]-->

<!-- The pattern that ended up on nearly every page after 2010 -->
<!--[if lt IE 7]> <html class="no-js ie6"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
sandboxed demo · breaks nothing but itselfrestart

More in browser wars

all 19 in browser wars › · the whole library ›