Home  >  Article  >  Web Front-end  >  Introduction to html meta usage examples

Introduction to html meta usage examples

高洛峰
高洛峰Original
2017-02-23 13:25:321249browse

Example usage

<!DOCTYPE html> 
<!--[if lt IE 7]><html class="ie6"><![endif]--> 
<!--[if IE 7]><html class="ie7"><![endif]--> 
<!--[if IE 8]><html class="ie8"><![endif]--> 
<!--[if IE 9]><html class="ie9"><![endif]--> 
<!--[if (gt IE 9)|!(IE)]><!--> 
<html class="w3c"> 
<!--<![endif]--> 
<head> 
<meta charset="utf-8" /> 
<title>tinyCss--my css study tidy</title> 
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" /> 
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" /> 
<meta content="my css study tidy" name="description" /> 
<meta content="css,tidy" name="keywords" /> 
<meta content="index,follow" name="robots" /> 
<meta content="tinycss" name="application-name" /> 
<meta content="no-cache" http-equiv="Cache-Control" /> 
<meta content="-1" http-equiv="Expires" /> 
</head> 
<body></body> 
</html>

[code]
Tips 1:

viewport, when your page has a width, for example, the width is 1000px, set width=1000, compatibility would be better.

Tip 2:

X-UA-Compatible, this attribute is only recognized by ie8 browser. It is a common application to let ie8 render in ie7 mode; like this: content="IE =7"; It would be a better suggestion not to use this meta, because after all, ie8....

Tip 3:

Expires: Document expiration time. After this time, you need to request it again from the server, and caching cannot be used; content="-1" theoretically disables caching. .


#For more html meta usage examples and related articles, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn