HTML meta

<meta>元素位于<head>元素中半包含着所在页面的相关信息。

这些信息用户看不到,专门给浏览器看的。

<meta>元素常见属性说明:

 属性  示例  说明
 description <meta name="description" content="利永贞网" /> 有关页面的描述
 keywords <meta name="keywords" content="HTML, CSS, JavaScript" /> 页面关键字
 robots <meta name="robots" content="noindex" /> 是否允许搜索引擎抓取。noindex不允许抓取,nofollow可以抓取,但不抓取页面链接的其它页面。
 author <meta http-equiv="author" content="王老师" /> 页面设计者
 pragma <meta http-equiv="pragma" content="no-cache" /> 页面缓存
 expires <meta http-equiv="expires" content="Fri, 04 Apr 2018 23:59:59 GMT" /> 指定缓存的有效期

示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<html>
    <head>
        <title>页面信息</title>
        <meta name="description" content="利永贞网" />
        <meta name="keywords" content="HTML, CSS, JavaScript" />
        <meta name="robots" content="noindex" />
        <meta http-equiv="author" content="王老师" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="expires" content="Fri, 04 Apr 2018 23:59:59 GMT" />
    </head>
    <body>
         
    </body>
</html>
原文地址:https://www.cnblogs.com/lsyw/p/10577023.html