Detect Internet Explorer Using HTML
This method allows you to use simple code in your HTML to detect Internet Explorer (IE). You can determine whether or not the end user is using IE, and if so, which version. This allows you to provide content based on which browser is being used.
The code snippets used in this technique are called called conditional comments. The following example simply says "If the browser is Internet Explorer, show this content".
Place content here to target all Internet Explorer users.
The next example is the opposite: "Only show this content if the browser is NOT Internet Explorer".
Place content here to target all users not using Internet Explorer.
The next example shows the content if the browser version is greater than or equal to 8.
Place content here to target users of Internet Explorer 8 or higher.
A similar example shows the content if the browser version is less than 7 (i.e. 6 or lower).
Place content here to target users of Internet Explorer 6 or lower (less than 7).
How Conditional Comments Work
Conditional comments are only recognized by Internet Explorer — other browsers treat them as normal comments and ignore them. Note that in the second example above (the one that targets "other" browsers), the content is not actually inside a comment — that's why other browsers display it.