Determine IE version in html and ie in html

Source: Internet
Author: User

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]> 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.