Something IE Got Right in 1995 and Others Should Add
<!--[if IE 8]>This will only show in IE 8!<![endif]-->
<!--[if IE 8]><link type="text/css" rel="stylesheet" href="ie8.css" /><![endif]-->
Browsers other than IE will ignore the above as a completely valid HTML comment, but IE recognizes the special syntax and parses the condition to determine when it is appropriate to display. There are a variety of conditional operators that allow developers to target IE in general, or versions greater than / less than or equal to a specific number. To learn more about IE’s conditional comments and the available options, check out Microsoft’s msdn page on the subject.
The ease and cleanliness of this method made me start wondering why I couldn’t do [if CHROME] or [if LTE FF2]? Microsoft recognized early on that, because different browsers, even different versions of the same browser, render differently, there is a need to specify code for a specific browser or version. While other browsers may rightfully consider themselves more “standards compliant”, tweaks are still made with every new version which cause differences, and I believe it would be helpful to be able to employ the clean, effective conditional comments method to specify unique code for every browser.