Determine IE version in html and ie in html
Html judge IE version 1. <! -- [If! IE]> <! --> All except IE can be recognized <! -- <! [Endif] --> 2. <! -- [If IE]> all IE identifiable <! [Endif] --> 3. <! -- [If IE 5.0]> only IE5.0 can recognize <! [Endif] --> 4. <! -- [If IE 5]> only IE5.0 and IE5.5 can be recognized <! [Endif] --> 5. <! -- [If gt IE 5.0]> both IE5.0 and IE5.0 can be recognized <! [Endif] --> 6. <! -- [If IE 6]> only IE6 can recognize <! [Endif] --> 7. <! -- [If lt IE 6]> versions earlier than IE6 and IE6 are recognizable <! [Endif] --> 8. <! -- [If gte IE 6]> IE6 and IE6 and later versions can be recognized <! [Endif] --> 9. <! -- [If IE 7]> only IE7 is recognizable <! [Endif] --> 10. <! -- [If lt IE 7]> versions earlier than IE7 and IE7 are recognizable <! [Endif] --> 11. <! -- [If gte IE 7]> IE7 and IE7 versions can be identified <! [Endif] --> <! -- [If lte IE 6]> ...... <! [Endif] --> Ite: less than or equal to means less than or equal to the IE6 browser. It is used for condition comments of IE browser and is often used for CSShack and JS for IE. In the process of learning and applying standard WEB pages, the compatibility of WEB pages with browsers is a common problem. Among them, Microsoft Internet Explorer (IE) occupies more than half of the browser market, in addition to Firefox and Opera. These browsers must be compatible. At the same time, for IE alone, due to the replacement of the IE version, viewers currently use IE5 (IE5.5), IE6, and IE7. The three versions display different interpretations of the standard WEB page (XHTML + CSS. In addition, other non-IE browsers and IE have different interpretations of some CSS. Therefore, you can use the proprietary condition annotations in IE browser to define relevant attributes. Condition annotations can only be used for Explorer 5 + Windows (IE) (condition annotations are supported from IE5 ). If you have installed Multiple IE, the Conditional comments will be based on IE of the highest version (IE 7 is currently used ). Conditional annotations can only be used in windows Internet Explorer (IE). Therefore, you can add special commands for IE by using conditional annotations. In layman's terms, condition comments are some if judgments, but these judgments are not executed in scripts, but directly executed in html code, such as: <! -- [If IE]> here is the normal html code <! [Endif] --> 1. Basic Structure of condition annotation and HTML annotation (<! -->) Is the same. Therefore, browsers other than IE will regard them as common comments and ignore them completely. 2. IE will determine whether to parse the content in the condition comment just like the normal page content based on the if condition. 3. Conditional annotations use the HTML annotation structure. Therefore, they can only be used in HTML files, not CSS files. You can use the following code to check the version of the current IE browser (Note: it is ineffective in non-ie browsers) <! -- [If IE]>