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