Use Conditional Browser Statements

How to use conditional browser statements on your website

A list of browser queries for those that still use them, going all the way back to Internet Explorer 5.

<!--[if IE]>
 According to the conditional comment this is Internet Explorer
<![endif]-->

<!--[if IE 5]>
 According to the conditional comment this is Internet Explorer 5
<![endif]-->

<!--[if IE 5.0]>
 According to the conditional comment this is Internet Explorer 5.0
<![endif]-->

<!--[if IE 5.5]>
 According to the conditional comment this is Internet Explorer 5.5
<![endif]-->

<!--[if IE 6]>
 According to the conditional comment this is Internet Explorer 6
<![endif]-->

<!--[if IE 7]>
 According to the conditional comment this is Internet Explorer 7
<![endif]-->

<!--[if gte IE 5]>
 According to the conditional comment this is Internet Explorer 5 and up
<![endif]-->

<!--[if lt IE 6]>
 According to the conditional comment this is Internet Explorer lower than 6
<![endif]-->

<!--[if lte IE 5.5]>
 According to the conditional comment this is Internet Explorer lower or equal to 5.5
<![endif]-->

<!--[if gt IE 6]>
 According to the conditional comment this is Internet Explorer greater than 6
<![endif]-->

<!--[if !IE]> -->
According to the conditional comment this is anything other than IE
<!-- <![endif]-->

<!--[if ! Opera]> According to the conditional comment this is any version of Opera <![endif]-->

Check out the media queries article to avoid having to use these to support older browsers with your layout.