html meta标签有啥作用

DTD

# HTML5

广泛来讲 HTML CSS JavaScript 的升级, 尤其是 JavaScript!

# DTD

<!DOCTYPE html>

# 标签

新增语义标签

<header><footer><section><article><nav><hgroup><aside><figure>

废除标签

<big><u><font><basefont><center><s><tt>

多媒体标签

<canvas><audio><video>

<input> 属性 email url number date time datetime datetime-local month week checked

<script> async

data-

# 存储

WebStorage IndexedDB application cache PWA

# meta

<meta charset="utf-8" />
<meta name="keywords" content="it,front-end"/>
<meta name="description" content="网页描述"/>
<meta name="author" content="shinekidd"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<meta name="referrer" content="never"/>
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<!-- 禁止浏览器从本地缓存中读取网页,即浏览器一旦离开网页在无法连接网络的情况下就无法访问到页面。 -->
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="refresh" content="1; url=https://www.baidu.com"/>
<link type="text/css" rel="stylesheet" href="common.css">
<link href=main.css rel=preload as=style>
<link href=main.js rel=preload as=script>

preload 是告诉浏览器页面必定需要的资源,浏览器一定会加载这些资源

prefetch 是告诉浏览器页面可能需要的资源,浏览器不一定会加载这些资源

# src

<img src=>
<audio src=>
<video src=>
<iframe src=>
<embed src=>