HTML <meta>标签
时间:2019-06-08 23:19:36 来源:igfitidea点击:
说明
HTML<meta>标签用于声明HTML文档的元数据。
HTML与XHTML的区别
在HTML中,<meta>标签没有结束标签。
在XHTML中,<meta>标签必须正确关闭。
示例
<html>
<head>
<title>HTML meta 标签</title>
<meta name = "keywords" content = "HTML, meta tag, metadata" />
<meta name = "description" content = "网页的简单描述说明" />
<meta http-equiv = "refresh" content = "10" />
</head>
<body style = "background-color:orange">
网页的内容
</body>
</html>
属性
| 属性 | 值 | 说明 |
|---|---|---|
| Name | author description keywords generator revised others | 属性的名称。 |
| content | text | 定义与http-equiv或名称关联的元信息。 |
| http-equiv | content-type expires refresh set-cookie | 将内容属性连接到HTTP头。 |
| scheme | text | 定义用于解释content属性值的格式。 |
标准属性
| 属性 | 说明 |
|---|---|
| dir | 指定文本的方向 |
| lang | 设置语言代码。 |
| xml:lang | 设置语言代码。 |

