The meta tag in HTML5 and the hook that IE browser can recognize, html5meta

Source: Internet
Author: User

The meta tag in HTML5 and the hook that IE browser can recognize, html5meta
I. Use meta tags 1. Use the description attribute to increase the click rate

<meta name="description" content="A general guide on the use of meta tags in html pages" />

2. Set character sets
<meta charset="UTF-8" />

3. redirection and timed refresh
<! -- Refresh regularly every 5 seconds --> <meta http-equiv = "refresh" content = "5; url = http://www.sitepoint.com/"/>

4. adaptive device width (for mobile devices)
<Meta name = "viewport" content = "width = device-width, initial-scale = 1.0"> <meta name = "viewport" content = "width = device-width, initial-scale = 1, maximum-scale = 1, minimum-scale = 1, user-scalable = no "> content parameter: width viewport width (numeric value/device-width) height viewport height (numeric value/device-height) initial-scale initial scaling ratio maximum-scale maximum scaling ratio minimum-scale minimum scaling ratio user-scalable allow user Scaling (yes/no) minimal-ui iOS 7.1 beta 2 adds properties on the page Minimize the upper and lower status bars during loading. This is a Boolean value and can be written as follows: <meta name = "viewport" content = "width = device-width, initial-scale = 1, minimal-ui">


5. Use the highest mode rendering for IE
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Ii. Use of browser hooks (mainly for IE browsers)
1. <! -[If! IE]> <! -> All except Internet Explorer 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 or later versions are recognizable <! [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 recognized <! [Endif]->











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.