Introduction to html meta usage examples

高洛峰
Release: 2017-02-23 13:25:32
Original
1260 people have browsed it

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>
Copy after login

[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!


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template